Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #52429 > unrolled thread

Text Question

Started byisw <isw@witzend.com>
First post2013-11-18 12:09 -0800
Last post2013-11-22 22:21 -0800
Articles 7 — 5 participants

Back to article view | Back to comp.sys.mac.system


Contents

  Text Question isw <isw@witzend.com> - 2013-11-18 12:09 -0800
    Re: Text Question David Ritz <dritz@mindspring.com> - 2013-11-18 15:47 -0600
      Re: Text Question isw <isw@witzend.com> - 2013-11-18 22:08 -0800
        Re: Text Question ErikRS <mac-dane@is.invalid> - 2013-11-23 01:14 +0100
    Re: Text Question Wes Groleau <Groleau+news@FreeShell.org> - 2013-11-19 01:40 -0500
    Re: Text Question Salmon Egg <SalmonEgg@sbcglobal.net> - 2013-11-22 16:38 -0800
      Re: Text Question isw <isw@witzend.com> - 2013-11-22 22:21 -0800

#52429 — Text Question

Fromisw <isw@witzend.com>
Date2013-11-18 12:09 -0800
SubjectText Question
Message-ID<isw-9DE50A.12092018112013@[216.168.3.50]>
I collect recipes. Of course, recipes frequently use amounts such as 
"1/2" or "1/4".

Sometimes, when I import recipes into Mac Gourmet from certain web 
sites, the fraction is sort of "compressed": the slash overlaps the 
digits in an odd way. Doesn't happen with many sites, but "Food Network" 
is one.

Doing a manual edit to fix the problem, it appears that there is some 
invisible thing in there -- it takes three "delete" strokes to get rid 
of the 4 and the / of "1/4", for example.

I'd like to write a script to fix this every time it occurs, but I don't 
know what to look for.

Any suggestions on how to find out what's going on in the text or how to 
fix it?

Isaac

[toc] | [next] | [standalone]


#52434

FromDavid Ritz <dritz@mindspring.com>
Date2013-11-18 15:47 -0600
Message-ID<alpine.OSX.2.11.1311181521330.68657@mako.ath.cx>
In reply to#52429

[Multipart message — attachments visible in raw view] — view raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday, 18 November 2013 12:09 -0800, 
 in article <isw-9DE50A.12092018112013@[216.168.3.50]>, 
 isw <isw@witzend.com> wrote:

> I collect recipes. Of course, recipes frequently use amounts such as 
> "1/2" or "1/4".

> Sometimes, when I import recipes into Mac Gourmet from certain web 
> sites, the fraction is sort of "compressed": the slash overlaps the 
> digits in an odd way. Doesn't happen with many sites, but "Food 
> Network" is one.

> Doing a manual edit to fix the problem, it appears that there is 
> some invisible thing in there -- it takes three "delete" strokes to 
> get rid of the 4 and the / of "1/4", for example.

Isaac,

I believe you're asking about 8-bit characters, such as ½, ⅓, ,⅔ ¼ 
and ¾ (unicode 00BD, 2153, 2154, 00BC and 00BE).  (Do note, 
MT-NewsWatcher may break these UTF8 characters, representing one half, 
one third, two thirds, one quarter and three quarters.)  There are 
plenty of other fractional representation, for one fifth, through 
seven eighths.  These are quite standard representations of digits.

> I'd like to write a script to fix this every time it occurs, but I 
> don't know what to look for.

> Any suggestions on how to find out what's going on in the text or 
> how to fix it?

As there's nothing broken in these representations, I'm uncertain it 
requires a 'fix'.  Perhaps choosing a different font or font size 
might make these 8-bit characters easier for you to read and alleviate 
any confusion they might cause.

- -- 
David Ritz <dritz@mindspring.com>
 Be kind to animals; kiss a shark.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (Darwin)
Comment: Public Keys: <http://dritz.home.mindspring.com/keys.txt>

iEYEARECAAYFAlKKivAACgkQUrwpmRoS3usXjACfZ/W0sDmtJTiOYHut44QbXH9b
vrYAn1tHDh39lT8EyGYkYRgE4rl8gJtl
=pgZS
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#52439

Fromisw <isw@witzend.com>
Date2013-11-18 22:08 -0800
Message-ID<isw-294A0A.22082618112013@[216.168.3.50]>
In reply to#52434
In article <alpine.OSX.2.11.1311181521330.68657@mako.ath.cx>,
 David Ritz <dritz@mindspring.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Monday, 18 November 2013 12:09 -0800, 
>  in article <isw-9DE50A.12092018112013@[216.168.3.50]>, 
>  isw <isw@witzend.com> wrote:
> 
> > I collect recipes. Of course, recipes frequently use amounts such as 
> > "1/2" or "1/4".
> 
> > Sometimes, when I import recipes into Mac Gourmet from certain web 
> > sites, the fraction is sort of "compressed": the slash overlaps the 
> > digits in an odd way. Doesn't happen with many sites, but "Food 
> > Network" is one.
> 
> > Doing a manual edit to fix the problem, it appears that there is 
> > some invisible thing in there -- it takes three "delete" strokes to 
> > get rid of the 4 and the / of "1/4", for example.
> 
> Isaac,
> 
> I believe you're asking about 8-bit characters, such as 1�2, ⅓, ,⅔ ¼ 
> and ¾ (unicode 00BD, 2153, 2154, 00BC and 00BE).

I don't think that's the problem. In fact, I have text substitution set 
up to replace "1/2" with the little one, and so forth. The replacement 
does not take place with the "raw" text, but does happen after I re-type 
the offending fraction, so I think that what is visible is not just a 
forward slash and a digit. Also, the need to do three "delete" 
operations to get rid of two visible glyphs ("/" and "4") is 
inconsistent with it being a single character.

Isaac

[toc] | [prev] | [next] | [standalone]


#52521

FromErikRS <mac-dane@is.invalid>
Date2013-11-23 01:14 +0100
Message-ID<l6os1h$9ac$1@solani.org>
In reply to#52439

isw wrote:
> David Ritz <dritz@mindspring.com> wrote:
>> isw <isw@witzend.com> wrote:
>>> I collect recipes. Of course, recipes frequently use amounts such as
>>> "1/2" or "1/4".
>>
>>> Sometimes, when I import recipes into Mac Gourmet from certain web
>>> sites, the fraction is sort of "compressed": the slash overlaps the
>>> digits in an odd way. Doesn't happen with many sites, but "Food
>>> Network" is one.
>>>
>>> Doing a manual edit to fix the problem, it appears that there is
>>> some invisible thing in there -- it takes three "delete" strokes to
>>> get rid of the 4 and the / of "1/4", for example.
>>
>> I believe you're asking about 8-bit characters, such as 1�2, ⅓, ,⅔ ¼
>> and ¾ (unicode 00BD, 2153, 2154, 00BC and 00BE).
>
> I don't think that's the problem. In fact, I have text substitution set
> up to replace "1/2" with the little one, and so forth. The replacement
> does not take place with the "raw" text, but does happen after I re-type
> the offending fraction, so I think that what is visible is not just a
> forward slash and a digit. Also, the need to do three "delete"
> operations to get rid of two visible glyphs ("/" and "4") is
> inconsistent with it being a single character.

I think David is on the right way here. MacGourmet isnot UTF-8 nor 
UTF-16 compatible. It can handle various formats directly from a variaty 
of website recipe libraries - those mostly based on HTML, XML or PDF but 
also some various plain text sites. So it depends on from where you 
import....

I had many problems solving these problems when I made the Danosh 
translation of the MacGourmet 3.x and I gave up and just let the paths 
stay 'as is' - including " / " ",/ ",/,' etc. and only translated the 
text around these paths.

After saving the localization file I could then open it in XCode and fx. 
correct a ",/," to " / " (the empty space represents a ciffer value from 
0-9)

If it can help, the text parts of the 'engine' is nearly of same modus 
as the one used in Apple Pages. But Mariner chose not to use Unicode as 
the standard in MG3.x.

I'll suggest that you try to import to either Pages, NisusWriter Pro or 
OpenOffice and 'clean' the text before saving as a PDF or TEXT file 
which you then import to MacGourmet. - I know it's a kind of 
double-work, but I think it's the only way to make a work-around. We 
have the same problems in Danish where 1/2, 1/3, 1/4 3/4 etc are equal 
to ⅓ ⅔ ¼ etc.

Cheers, Erik Richard




-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Erik Richard Sørensen, Member of ADC, <mac-daneRE@MOVEstofanet.dk>
NisusWriter - The Future In Multilingual Text Processing - www.nisus.com
Openoffice.org - The Modern Productivity Solution - www.openoffice.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[toc] | [prev] | [next] | [standalone]


#52441

FromWes Groleau <Groleau+news@FreeShell.org>
Date2013-11-19 01:40 -0500
Message-ID<l6f14f$dkv$1@dont-email.me>
In reply to#52429
On 11-18-2013, 15:09, isw wrote:
> I collect recipes. Of course, recipes frequently use amounts such as
> "1/2" or "1/4".
>
> Sometimes, when I import recipes into Mac Gourmet from certain web
> sites, the fraction is sort of "compressed": the slash overlaps the
> digits in an odd way. Doesn't happen with many sites, but "Food Network"
> is one.
>
> Doing a manual edit to fix the problem, it appears that there is some
> invisible thing in there -- it takes three "delete" strokes to get rid
> of the 4 and the / of "1/4", for example.
>
> I'd like to write a script to fix this every time it occurs, but I don't
> know what to look for.
>
> Any suggestions on how to find out what's going on in the text or how to
> fix it?

There's probably an invisible character that affects spacing, either in 
the original, or inserted by Mac Gourmet.

If you can put the text in a file, open it in TextEdit with encoding 
"automatic"  Then "save as" encoding UTF-16.  Then,

od -xc filename

will show you the hexadecimal for all the characters.

If you find an extra bit pattern in your fraction, you can look up what 
it is online.  If, for example, you see

iMac:~ wgroleau$ od -xc striketext
0000000  feff    0073    0336    0074    0336    0072    0336    0069
        377 376   s  \0   6 003   t  \0   6 003   r  \0   6 003   i  \0

and you want to find out the character between the 's' and the 't' …
(Note that the characters are byte swapped from the hex)

Use   Unicode   and    U+0336   as search terms  and you'll find things 
like <https://www.google.com/search?q=Unicode+U%2B0336>


-- 
Wes Groleau

Change is inevitable.  We need to learn that “inevitable" is
neither a synonym for “good" nor for “bad.”

[toc] | [prev] | [next] | [standalone]


#52522

FromSalmon Egg <SalmonEgg@sbcglobal.net>
Date2013-11-22 16:38 -0800
Message-ID<SalmonEgg-A1975A.16382322112013@news80.forteinc.com>
In reply to#52429
In article <isw-9DE50A.12092018112013@[216.168.3.50]>,
 isw <isw@witzend.com> wrote:

> I collect recipes. Of course, recipes frequently use amounts such as 
> "1/2" or "1/4".
> 
> Sometimes, when I import recipes into Mac Gourmet from certain web 
> sites, the fraction is sort of "compressed": the slash overlaps the 
> digits in an odd way. Doesn't happen with many sites, but "Food Network" 
> is one.
> 
> Doing a manual edit to fix the problem, it appears that there is some 
> invisible thing in there -- it takes three "delete" strokes to get rid 
> of the 4 and the / of "1/4", for example.
> 
> I'd like to write a script to fix this every time it occurs, but I don't 
> know what to look for.
> 
> Any suggestions on how to find out what's going on in the text or how to 
> fix it?
> 
> Isaac

I certainly am no expert on the subject but have run into similar 
problems. On NewsWatcher, and I presume similar news readers, there is 
an Edit menu selection available to choose a decoding option. The 
problem I have had is that some decodings shrink text to tiny sized 
fonts. My guess is that some combinations get interpreted as control 
characters to do so.

As a suggestion, when that happens, try changing to different decoding 
options. I certainly would be interested in your results.

-- 

Sam

Conservatives are against Darwinism but for natural selection.
Liberals are for Darwinism but totally against any selection.

[toc] | [prev] | [next] | [standalone]


#52532

Fromisw <isw@witzend.com>
Date2013-11-22 22:21 -0800
Message-ID<isw-65B080.22212722112013@[216.168.3.50]>
In reply to#52522
In article <SalmonEgg-A1975A.16382322112013@news80.forteinc.com>,
 Salmon Egg <SalmonEgg@sbcglobal.net> wrote:

> In article <isw-9DE50A.12092018112013@[216.168.3.50]>,
>  isw <isw@witzend.com> wrote:
> 
> > I collect recipes. Of course, recipes frequently use amounts such as 
> > "1/2" or "1/4".
> > 
> > Sometimes, when I import recipes into Mac Gourmet from certain web 
> > sites, the fraction is sort of "compressed": the slash overlaps the 
> > digits in an odd way. Doesn't happen with many sites, but "Food Network" 
> > is one.
> > 
> > Doing a manual edit to fix the problem, it appears that there is some 
> > invisible thing in there -- it takes three "delete" strokes to get rid 
> > of the 4 and the / of "1/4", for example.
> > 
> > I'd like to write a script to fix this every time it occurs, but I don't 
> > know what to look for.
> > 
> > Any suggestions on how to find out what's going on in the text or how to 
> > fix it?
> > 
> > Isaac
> 
> I certainly am no expert on the subject but have run into similar 
> problems. On NewsWatcher, and I presume similar news readers, there is 
> an Edit menu selection available to choose a decoding option. The 
> problem I have had is that some decodings shrink text to tiny sized 
> fonts. My guess is that some combinations get interpreted as control 
> characters to do so.
> 
> As a suggestion, when that happens, try changing to different decoding 
> options. I certainly would be interested in your results.

MacGourmet has no decoding options. I import the files directly there 
with a Services tool provided by them.

Isaac

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.mac.system


csiph-web