Chinese character between SciTE and Metaeditor

 

Hi,

SciTE is much better than Metaeditor. Everybody may want to try this: https://code.google.com/p/scite-mql/

I can create in SciTE a code including Chinese words and save, and open this code file. Also I can copy&paste into Metaeditor and then save as .mq4 file. But drag this mq4 file from metatrader folder and drop into SciTE interface, Chinese words are graphical, every encoding doesn't work.

I also tried: create in SciTE a blank file, first change encoding to UTF8, then fill in some code including Chinese words, then save as .mq4 file directly into MT4 folder. Then compile it in SciTE, and run MT4, load this indicator. MT4 shows some graphic character in the chart window.

Any idea?

 
I am not sure what you are looking for. Metaeditor obviously does not support UTF8 while Scite does.
 
Ovo:
I am not sure what you are looking for. Metaeditor obviously does not support UTF8 while Scite does.


Thanks for the reply. Apparently M and S both supports chinese character in the code, and MT4 can show these in chart window. I often use this.

Just something wrong in between.

 
joshatt:


Thanks for the reply. Apparently M and S both supports chinese character in the code, and MT4 can show these in chart window. I often use this.

Just something wrong in between.

Yes, you probably can see it, though I can't - I have different international settings for Windows.

If you like to switch the UTF-8 off, I suppose it may be controlled by the below part of SciTEGlobal (I did not try). No warranty, just guess.

[International]
#added utf8 auto check
utf8.auto.check=2
# default code setting, depends on your system
code.page=65001
# if code.page not equal 65001, it will set buffer to utf8(65001) when creating new buffer:
new.buffer.in.utf8=1
character.set=0
# Required for Unicode to work on GTK+:
output.code.page=65001
 
Ovo:

Yes, you probably can see it, though I can't - I have different international settings for Windows.

If you like to switch the UTF-8 off, I suppose it may be controlled by the below part of SciTEGlobal (I did not try). No warranty, just guess.


I just changed one line, in Scitegloable, as you're telling me:

# default code setting, depends on your system
code.page=936

And it works !!!

Before this, I tried adding two lines to User Options File:

code.page=936
output.code.page=936

It could only solve half of this problem --- I can type new code new words, it can show in MT4 chart window. But if I copy&paste some words into SciTE, error still happens.

So, you idea is correct. Thanks to you, I solved this, for years for me. I'll give it more try to find if other bug occurs.

~Cheers.

 

P.S. I love this SciTE.....

  • MQL syntax highlighting
  • Compiler integration
  • Auto-update MT4 upon compilation
  • Function listing
  • Autocomplete
  • Parameter hint
  • Help integration (press F1 on keyword brings up Help window)
  • Bracket matching
  • Block collapse / expand
  • Snippet, abbreviation support
  • Theming

I especiall like: comiler, bracket matching, autocomplete (not just MQL key word, it also completes any variable that you've written.)

 
joshatt:

P.S. I love this SciTE.....

  • MQL syntax highlighting
  • Compiler integration
  • Auto-update MT4 upon compilation
  • Function listing
  • Autocomplete
  • Parameter hint
  • Help integration (press F1 on keyword brings up Help window)
  • Bracket matching
  • Block collapse / expand
  • Snippet, abbreviation support
  • Theming

I especiall like: comiler, bracket matching, autocomplete (not just MQL key word, it also completes any variable that you've written.)

All these features will be available in the new unified editor for mql4/mql5.