Symbianos Series 60 Learning Note 1: HelloWorld Dizzy

zhaozj2021-02-16  96

Yesterday, helloWorld is actually unsuccessful, really depressed, can only run on the simulator but can't run on the machine, do not understand what is going on, and discuss it, colleagues say that it is possible to compile version issues. At this time, I really had a real understanding, I found some entry-level documents, I found that the original people have already said very clearly: generate the makefile file with the BLDMAKE BUILD WINS UDEB to generate the simulator Run Code Abld Build Armi Urel generates the machine Run code I put the program running on the simulator to the machine, of course, it is getting more and more impetuous, I can't calm down, I can't calm down. The program can run on the machine, but there are some problems in Chinese. . Since Symbian's operating system is set with UTF-8 character set, take a look at how the document is solved, and some simple routines of Symbian & Nokia Series60SDK are studied, and they finally gain.

Of course, there is also a solution to the Chinese problem, write a function:

Void ConvertGBKTOUTF (TTEXT8? * Source, TDES & TARGET) {ccnvcharacTerSetConverter * Converter = ccnvcharacTerSetConverter :: newlc ();

IF (Converter-> PreparetoconvertToorfroml (KcharacterSetIdentifierGBK, IEikonenv-> fssession ())! = ccnvcharacTerSetConverter :: Eavailable) User :: Leave (KerrNotSupported);

Tint State = ccnvcharacTerSetConverter :: kStatedEfault;

TPTRC8 STR (Source); hbufc * Iinfotext = HBUFC :: newl (Str.Length ()); tptr16 ptr = Iinfotext-> DES ();

IF (ccnvcharactersetConverter :: ErrorillForMedInput == Converter-> ConvertTouNicode (PTR, STR, STATE)) User :: Leave (Kerrargument);

Target.copy (PTR);

Cleanupstack :: PopandDestroy ();

转载请注明原文地址:https://www.9cbs.com/read-11571.html

New Post(0)