From: Wes Gamble Date: 2006-05-25T15:04:37+09:00 Subject: Re: How does one transform UTF-8 encoded characters to ASCII Wes Gamble wrote: > If I do an Iconv from windows-1252 to UTF-8 and > then I operate on my UTF-8 string to do something to it and > then I do an Iconv back to windows-1252 before I write to a file, > > THEN > > I should not have any need to place a BOM into the string correct? > > The BOM is only to help applications understand that the encoding of the > text is UTF-8, correct? > > Wes One last thing - I believe that one of my issues is that when I attempt to convert BACK to 1252/ISO-8859 or whatever, that some of my UTF-8 chars will not convert because they don't exist in the target character encodings. If that's true, then I could write the UTF-8 encoded data into a file provided that I preceded it with the BOM. Does that sound right? Man, when I got up this morning I didn't know I'd be learning how to convert character encodings in Ruby. Oh joy!!!! Wes -- Posted via http://www.ruby-forum.com/.