Page 1 of 2
Feature request - XML Encoding
Posted: 02.03.2022 08:19
by ertank
Hello,
Some XML files have a line as the first line of the file that indicates the XML encoding
Code: Select all
<?xml version="1.0" encoding="ISO-8859-9"?>
Is it possible to set encoding using this information?
Thank you for your consideration.
Regards,
Ertan
Posted: 02.03.2022 08:27
by main Alexey
Lazarus supports these ISO encodings
iso-8859-1
iso-8859-2
iso-8859-15
but it missed your case iso-8859-9. maybe sometimes one appears who will add 'your case' too.
yes I know that you suggest to parse XML line, but it's no help now.
wikipedia
https://en.wikipedia.org/wiki/ISO/IEC_8859-9
>>It is designated ECMA-128 by Ecma International and TS 5881 as a Turkish standard.
so I suggest that some Turkish man adds the Lazarus patch.
Posted: 02.03.2022 09:37
by main Alexey
just added ISO-8859-9 (Turkish encoding) to CudaText.
please test that it works ok:
beta 1.157.0.1 (note: .1 at the end) here
http://uvviewsoft.com/c/
later I will try to parse that XML line and detect the encoding.
Posted: 18.03.2022 19:00
by ertank
Just had the chance to update my CudaText version to 1.158.2.0
What I see is ISO-8859-9 seems fine to me.
Thanks.
Posted: 09.04.2022 14:18
by ertank
main Alexey wrote:just added ISO-8859-9 (Turkish encoding) to CudaText.
Thank you for that. So far, I did not encounter any problem. I can say it is working.
main Alexey wrote:later I will try to parse that XML line and detect the encoding.
I appreciate if you can find time to do that.
Thanks & Regards,
Ertan
Posted: 09.04.2022 19:53
by main Alexey
Test how it works in the beta,
http://uvviewsoft.com/c/
Posted: 09.04.2022 20:54
by ertank
All XML files (about 6 different files) I tested with ISO-8859-9 encoding works just fine.
I made an UTF8 encoded XML file, copied it to a different name just to make it a newly opened file for CudaText and that file is also correctly opened as UTF8 encoding.
Thank you
Posted: 23.04.2022 15:16
by ertank
I just got another XML with below encoding which to my knowledge is identical to ISO8859-9
Code: Select all
<?xml version="1.0" encoding="Windows-1254"?>
This encoding is mapping to cp1254 in CudaText as to my knowledge. I wonder if it is possible to add it in auto encoding setting of XML files.
I could not check cp1254 encoding as I failed to change encoding of auto encoded XML file
Attached is a small video to explain what I mean. This is version 1.161.0.0 win64-x86_64 version I am using.
Thanks & Regards,
Ertan
Posted: 24.04.2022 20:17
by main Alexey
Maybe send me the small sample file, so I can check it here.
email: support (at) uvviewsoft.com
Maybe UTF8 takes precedence over cp1254..
Posted: 25.04.2022 13:52
by main Alexey
I repeat my reply from email.
I tested your file and _clean_ Cud opens it in cp1254. Not utf8. Can you pls test on _clean Cud_? if no problem there, add your plugins, 1 by 1, and see again.