PING: cwdjr

Nov 29, 2007 11 Replies

The next posting of the FAQ will be version 1.1, which contains a new Australia section as well as the much-anticipated correction to the FL information in the Napa section. Since I have yet to find a simple way of converting Apple's &%^%&^F()@&@ ISO-8859-1 to UTF-8, the "high ASCII" characters all get munged when the text file gets posted to the newsgroup. If you would like me to send you the changed portions as individual text files, drop me an email.



Mark Lipton


iconv -f ISO-8859-1 -t UTF-8 should work (assuming you're using OS X).

*smooch* Paul, you are my new best friend. :p I can't believe that my 2+ hours of Googling and experimental failures with ERE in sed failed to turn that up...

Mark Lipton

Too weird, Paul. The encoding it gives me for e.g. é is C2 E8, whereas the actual UTF-8 encoding is C3 A9!! Just to make sure that I wasn't off base, I posted the iconv'd file to alt.test as UTF-8 and -- sure enough -- the "high ASCII" characters aren't correctly rendered. To make sure, I just did the following:

$ perl -e'print "\x8E"' | iconv -f ISO-8859-1 -t UTF-8 | hexdump -C

which returned:

00000000 c2 8e |..|

Again, unless I'm missing something, it *should* return the proper UTF-8 encoding for e(acute): C3 A9. I tested a few other encodings and they all came back with a C2 byte prepended to the ISO-8859-1 byte value.

Any thoughts?

TIA Mark Lipton

0x8E isn't a valid ISO-8859-1 character. Assuming you meant 0xE8 (è), it should give you C3 A8; if it doesn't, there's probably something wrong with your installation of iconv.

Note that I don't have a Mac to test this on, so it's also possible that Apple does something weird to make this more difficult than it should be.

If I have trouble with the 1.1 post, I will contact you. I don't know anything about Apple's OS. My computer uses Windows XP. I do know that a lot of code gets messed up on Usenet posts. Thus I usually put up code as text files on a web page when I need to post html code on Usenet and give a link to this code.

The server that holds the wine group site uses yet another OS. It is Unix - Apache. The php include on all of the wine group pages that is labeled mime.php (viewable only on the php source code) uses the variable $charset = "iso-8859-1" for both html and xml. Although many other charsets are available, I usually still use iso-8859-1 for most pages. In the past, some old US computers did not handle UTF-8 or UTF-16 very well is the reason. However I suspect that most such older computers have been junked for quite a while.

Thanks for the input. Problem solved: what I was dealing with wasn't ISO-8859-1, but rather "Apple Extended ASCII," a completely non-standard

8-bit extension of ASCII. Fortunately, iconv does grok it, using the -f Macintosh flag. Many thanks again for pointing out iconv to me.

Mark Lipton

If you want the Euro character you will need 8859-15, it is missing from 8859-1 I believe.

CWDjr, (and of course you may know this already) just for your edification Apache is an open source group of software products including many popular internet applications like web server. Unix is type of OS, flavors include Linux, OSX Solaris, AIX etc. I guess most Unices (certainly Linux) will have good support for UTF-8.

I am posting from IRIX, a now mostly defunct Unix, on a computer made in the early part of the century.

-E

"Emery Davis" wrote .............

Which century would that be, Emery? ;-)

Given the speed of this thing, feels like the 19th! There's gotta be some liliputions turning cranks in there... Still it has its uses. ;)

-E

And here all this time I thought you were using a Difference Engine!

Posting from my Altair, Mark Lipton

Looking at the list of charsets at the official W3C validator, iso-8859-1 is labeled (Western Europe) and iso-8859-15 is labeled (Latin 9). I don't know if Latin 9 has had the symbol now used for the Euro built in all along, or if this is something new. Of course the advantage of UTF-8 or UTF-16 is that they are designed for all languages. I likely could start using either at this late date without problems with old computers.

The wine group site is on an Apache/1.3.31 Server. The Unix OS for it is Linux. The hosting company also will supply a Microsoft server if you wish. This is desired by people that want to put up specialized Microsoftese code and data bases that is not supported by many non-MS systems. Linux is much more common on servers than on PCs, at least in the US.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required