Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Unicode conversion (attention all devs)

<< < (15/23) > >>

rickg22:

--- Quote from: takeshimiya on August 07, 2005, 09:56:49 pm ---Almost CONGRATS!  :o
(almost until codecompletion is finished)

--- End quote ---

Remove that "almost", I just committed codecompletion to CVS :-)

IT'S FINISHED, YAY! :D

Edit: Emm... oops, I forgot to do the todo plugin (ironically) :oops:

Edit: Thanks to elvstone for converting the todo plugin. WE'RE FINISHED!!!!

rickg22:

--- Quote from: takeshimiya on August 07, 2005, 09:56:49 pm ---
About the File Unicode thing, C::B must save (by default) the files in ASCII mode (with options to save in UTF-8, UTF-16LE/BE as notepad haves).
Because most if not all compilers doesn't support unicode, only old plain ASCII.

And when saving text to a file in Unicode don't forget to put the BOM (Byte Order Mark) so all text editors know that is a file encoded in Unicode.
http://www.websina.com/bugzero/kb/unicode-bom.html
Of course when reading a file also take care of the BOM.


--- End quote ---

Please enlighten us about it! I don't know how to do that :-(

Also, some plugins also read the files, I don't think they're ready to handle the difference between ANSI and Unicode yet. But at least STAGE 1 has been completed. We'll keep developing and fixing bugs.

takeshimiya:
It's official, time to Celebrate!!
Congratulations all for all the hard work, I'm sure that now your dreams contains some _() and _T() between sheeps :lol:

Here are more info:
http://www.microsoft.com/globaldev/getwr/steps/wrg_unicode.mspx

I never tried using wx, but I think that to know the BOM it's something like:


--- Code: ---When reading any text file:
wxString file; // a file loaded entirely in a string

#ifdef UNICODE
    if(file[0] == 0xEF && file[1] == 0xBB && file[2] == 0xBF)
        // it's in UTF-8, wxMBConvert-it

    else if(file[0] == 0xFE && file[1] == 0xFF)
        // it's in UTF-16BE, wxMBConvert-it

    else if(file[0] == 0xFF && file[1] == 0xFE)
        // it's in UTF-16LE, wxMBConvert-it

    else
        // it's in ASCII, wxMBConvert-it
#else
    if(file[0] == 0xEFBB)
        // it's in UTF-8, wxMBConvert-it

    else if(file[0] == 0xFEFF)
        // it's in UTF-16BE, wxMBConvert-it

    else if(file[0] == 0xFFFE)
        // it's in UTF-16LE, wxMBConvert-it

    else
        // it's in ASCII, do nothing
#endif
--- End code ---

I don't know if this works, or if it's the best way, there was some discussion in the wx-mailing list to put this functionality in the wxMBConv classes or wxTexFile classes, etc
There was some patchs for this, I don't know what is the current state of this.

takeshimiya:
But well, I hope that C::B compiles in wx2.6+UNICODE+LINUX without lots of segfaults :)

So now a lot of test in linux is requiered, test in different distros with their owns versions of wxGTK2 Unicode (specially Ubuntu, Debian, Mandriva, and Fedora, they seem to be the more widespreaded right now). Any type of testing in linux is appreciated!

Please post in http://forums.codeblocks.org/index.php?topic=317 the results

rickg22:
OK then! :)

Time to move on. Let's squash some bugs! :P

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version