On quarta-feira, 31 de julho de 2013 19:39:28, Scott Aron Bloom wrote:
> QTextCodec * codec = QTextCodec::codecForName( "UTF-8" );
> QString a = codec->toUnicode( "a" );
> If ( a.isEmpty() )
> // don't Show
> QChar aChar = tmp.at( 0 );
> If ( aChar.unicode() != 'a' )
> // don't show
On quarta-feira, 31 de julho de 2013 19:24:28, Scott Aron Bloom wrote:
> QByteArray data = fi.readLine()
> QString contents = QString::fromLocal8Bit( currData )
> setPlainText( contents )
>
> Would the other setCodec functions be better ?
You shouldn't set any codec for the above. It's working al
On quarta-feira, 31 de julho de 2013 20:04:33, Richard Moore wrote:
> On 31 July 2013 19:54, Thiago Macieira wrote:
> > On quarta-feira, 31 de julho de 2013 18:21:42, Scott Aron Bloom wrote:
> >> As to the size of the codec.. Is there a way to tell the size?
> >
> > Hmm... You can feed it an 'a' a
On quarta-feira, 31 de julho de 2013 18:21:42, Scott Aron Bloom wrote:
> As to the size of the codec.. Is there a way to tell the size?
Hmm... You can feed it an 'a' and see how many bytes come out. Actually,
verify that the output is exactly one byte 0x61. That way, you'll also prevent
someone
-project.org
Subject: Re: [Interest] Certain QTextCodecs causing crashes on Linux
Are you using Ubuntu by any chance? We had a similar problem last year but it
was unrelated to Qt. If you tried to do several consecutive searches in a web
browser on Ubuntu using the French language, this exact
On quarta-feira, 31 de julho de 2013 16:44:10, Scott Aron Bloom wrote:
> 20 QTextCodec::setCodecForLocale( codec );
> 21 QMessageBox::warning( NULL, argv[ 0 ], codecName );
> 22 return 0;
> 23 }
>
> When called with UTF-32 I get the following crash:
> [scott@localhost build]$ ./CodecT
Are you using Ubuntu by any chance? We had a similar problem last
year but it was unrelated to Qt. If you tried to do several consecutive
searches in a web browser on Ubuntu using the French language, this
exact error would get sent to standard error and the browser would
crash.
Applying this