[Qt-interest] How do qt tell between Unicode and Ascii ?

Andreas Pakulat apaku at gmx.de
Sat Mar 6 14:08:27 CET 2010


On 06.03.10 20:14:08, Aaron Lewis wrote:
>     I was wondering how do i detect a string is Unicode or Ascii ,

A QString is always unicode. If you want to know wether it only holds
characters that fit into the ascii range you'll have to iterate over
them and check wether they're in the 0 <> 127 range.

Andreas

-- 
Tuesday is the Wednesday of the rest of your life.



More information about the Qt-interest-old mailing list