On Sat, 01 May 1999, Alex Zepeda wrote: >On Fri, 30 Apr 1999, Warwick Allison wrote: > >> The preferred method is simply NOT TO DO IT. When converting to "ascii" you >> need to consider WHY. For example, if you want to write a "text file", should >> that be in UTF-8, UTF-16, or the user's locale-specific 8-bit encoding? >> >> Whenever you call QString::ascii() you poke a stick in the eye of a non-Latin1 >> user. >> >> When you call: >> >> foo(bar.ascii()) >> >> you're probably better off fixing foo() to take const QString&. > >Well how else are we going to get at a bytearray useable for such things >as write(2). Some of us don't like using QFile or QTextStreams quite yet. If you are thinking about an applications own "proprietary" write and read format, then QString::utf8() and QString::fromUtf8(...) is what you want. This way your program will work for non-latin1 users as well (what wouldn't be the case if you convert unicode to ascii ) Matthias > >- alex