Author Topic: Support multi-byte character in editor of C::B???  (Read 10939 times)

Offline heromyth

  • Multiple posting newcomer
  • *
  • Posts: 98
    • http://
Support multi-byte character in editor of C::B???
« on: July 02, 2005, 06:29:30 pm »
For example, to support Chinese. It seems that I have to modify the scintilla in STC. I want to know whether  there is other way. :roll:

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Support multi-byte character in editor of C::B???
« Reply #1 on: July 03, 2005, 01:32:55 am »
Yes, it's called Unicode.

The bad news is, it's not supported yet :-(
The good news is, we're working on it ;-)

Offline heromyth

  • Multiple posting newcomer
  • *
  • Posts: 98
    • http://
Support multi-byte character in editor of C::B???
« Reply #2 on: July 03, 2005, 02:42:59 am »
Thanks for your works.
I don't think it must to use Unicode. Like wxTextCtrl that doesn't use Unicode, it seems to support multi-byte edit-operation(for example, input, delete, choice, copy etc.).

My problem in C:B is that I must press Backspace/Delete twice to delete a Chinese character, not like english character, just press once to delete it.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Support multi-byte character in editor of C::B???
« Reply #3 on: July 03, 2005, 03:27:52 am »
wxWidgets has native unicode support, but programs must be adapted to use it.

Codeblocks isn't adapted (yet), and this makes linking fail (or worse, crashing) when the wxWidgets library is compiled with unicode support. I'm sure that when we do that, you'll be able to edit chinese with no problem.

Offline heromyth

  • Multiple posting newcomer
  • *
  • Posts: 98
    • http://
Support multi-byte character in editor of C::B???
« Reply #4 on: July 03, 2005, 11:50:21 am »
Maybe we can refer to SciTE (see http://scintilla.sourceforge.net/SciTEDoc.html about code.page), which also depends on scintilla. In SciTE, I can edit Chinese perfectly through adding
Code
 code.page=936
 character.set=134

to SciTEGlobal.properties, not using unicode. Of course, we can add code.page=65001 for using unicode. Both work well in Windows.

For GTK+ in Linux, it seems that just using unicode can solve my question. So using unicode in C:B seems to be the best way.

Offline heromyth

  • Multiple posting newcomer
  • *
  • Posts: 98
    • http://
Support multi-byte character in editor of C::B???
« Reply #5 on: July 04, 2005, 05:32:10 am »
In STC, I can use SetCodePage (936) to support for Chinese. But the version of scintilla in STC seems to be old.  The support still has some problem. Maybe we should upgrade scintilla to the newest version. I'll try.