SciTE will automatically detect the encoding scheme used for Unicode files that start with a Byte Order Mark (BOM). The UTF-8 and UTF-16 encodings are recognised including both Little Endian and Big Endian variants of UTF-16.
UTF-8 files will also be recognised when they contain a coding cookie on one of the first two lines. A coding cookie looks similar to "coding: utf-8" ("coding" followed by ':' or '=', optional whitespace, optional quote, "utf-8") and is normally contained in a comment:
For other encodings set the code.page and character.set properties.
I try this. I put into the SciTEGlobal.properties this line:
code.page=65001
and I set the Files / Encoding to "UTF-8" propertie.
but when I close SciTE and open again, the Files / Encoding set returns to "Code Page Propertie".
Whell, the Code Page propertie is 65001, I suppose this is UTF-8... but Not !!
The UTF-8 is working only if I set one of the two first lines of my source file with a comment:
//~ # -*- coding: utf-8 -*- (for php)
or
# -*- coding: utf-8 -*- (for properties files and something similar.)
Does anybody know how to instruct SciTE in order to save "ALL source files" with UTF-* encoding, or then,to save "ALL PHP source files" with UTF-8 encoding ?
Thank you,
Odilon
> I try this. I put into the SciTEGlobal.properties this line:
>
> code.page=65001
>
> and I set the Files / Encoding to "UTF-8" propertie.
>
> but when I close SciTE and open again, the Files / Encoding set returns to
> "Code Page Propertie".
>
> Whell, the Code Page propertie is 65001, I suppose this is UTF-8... but Not
> !!
What evidence do you see that the file is not UTF-8?
Neil
--
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-i...@googlegroups.com.
To unsubscribe from this group, send email to scite-interes...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.
Are you sure you are entering special characters AFTER you save and
reload your file with the "coding: utf-8" cookie on top?
I had a seemingly similar issue.
Try this exact sequence:
1. create a new file
2. put -*- coding: utf-8 -*- (the so called "encoding cookie") in a
comment on the first line
3. save the file with a name of your choice
4. close and reopen the file (or just use "revert")
5. write some special char (in lines after the encoding cookie) and save
and close again
6. reopen the file and see if the special chars are there as you typed them
Best regards
-- Lorenzo
--
> Because the special characters that I use, when I save the file with UTF-8
> it appears OK, when I close the SciTE and reopen it, the special characters
> appears totaly wrong.
That isn't what happens to me.
1) Clear out SciTEUser.properties so there is nothing in it.
2) Add these lines to SciTEUser.properties:
code.page=65001
character.set=204
3) Create a New file
4) Type some Russian characters: йцу
5) Save as x.php
6) Close SciTE
7) Open SciTE
8) Open x.php
9) See йцу
Neil
Neil
> Is it important to download the latest release - 2.26?
The differences are listed on
http://www.scintilla.org/ScintillaHistory.html. It is up to you
whether you think its worth while upgrading since it will depend on
what you think is important.
> Can I download this release and just replace the executables and dll's?
You should only put your modifications in user properties. That
makes it easy to install a new version over the old version by just
copying all the new files over the old files.
Neil
Neil