OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Japanese
kybu
post Mar 14 2004, 12:11 AM
Post #1





Group: Members
Posts: 2
Joined: 13-March 04
Member No.: 2,303



Hi,

I would like to save japanese character in utf8 encoding to file on the japanese models of Zaurus, but I have no idea how to achieve this. I suppose that I need to convert QStrings data (input from user) to utf8, but how can I determine the encoding of that QString? Thanks.
Go to the top of the page
 
+Quote Post
torhans
post Jan 9 2005, 12:37 AM
Post #2





Group: Members
Posts: 2
Joined: 9-January 05
Member No.: 6,162



Hi

I'm successfully using the following, but there might be a better way.


#include <qtextstream.h>
#include <qstring.h>
...
FILE* writeFile;
QString strJapanese;
...
QTextStream outstream(writeFile,IO_WriteOnly);
outstream.setEncoding(QTextStream::UnicodeUTF8);
outstream << strJapanese << endl;
...

The encoding of the QString in handled internally and you need not to concern youself about it.

Regards
Torben
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd July 2014 - 01:20 AM