[PB5.70] Save txt file uses Windows-1258 format

Just starting out? Need help? Post your questions and find answers here.
User avatar
marcoagpinto
Addict
Addict
Posts: 945
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

[PB5.70] Save txt file uses Windows-1258 format

Post by marcoagpinto »

Hello!

While exporting the list of duplicate words in Proofing Tool GUI

Code: Select all

WriteString(1,t$+#LF$,#PB_UTF8)
I am saving in UTF-8 but Notepad++ says the file is in Windows-1258 format.

I tried to narrow it down but it only happens when I do it from inside PTG.
User avatar
NicTheQuick
Addict
Addict
Posts: 1226
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: [PB5.70] Save txt file uses Windows-1258 format

Post by NicTheQuick »

Maybe you have to write a BOM using WriteStringFormat().
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Little John
Addict
Addict
Posts: 4527
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: [PB5.70] Save txt file uses Windows-1258 format

Post by Little John »

marcoagpinto wrote:I am saving in UTF-8 but Notepad++ says the file is in Windows-1258 format.

I tried to narrow it down but it only happens when I do it from inside PTG.
So the bug is in your "PTG" program, not in PureBasic.
Or maybe Notepad++ gives a wrong information.
User avatar
marcoagpinto
Addict
Addict
Posts: 945
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: [PB5.70] Save txt file uses Windows-1258 format

Post by marcoagpinto »

NicTheQuick wrote:Maybe you have to write a BOM using WriteStringFormat().
It worked!

Thank you!
infratec
Always Here
Always Here
Posts: 6866
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: [PB5.70] Save txt file uses Windows-1258 format

Post by infratec »

You are long enough in this forum.
You should know that this section is for bugs of PB and not for your bugs.

With a hex editor you where able to see that it is not a bug in PB.
And if you are not sure: ask first in 'Coding Questions'.
User avatar
marcoagpinto
Addict
Addict
Posts: 945
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: [PB5.70] Save txt file uses Windows-1258 format

Post by marcoagpinto »

infratec wrote:You are long enough in this forum.
You should know that this section is for bugs of PB and not for your bugs.

With a hex editor you where able to see that it is not a bug in PB.
And if you are not sure: ask first in 'Coding Questions'.
Yes, I am terribly sorry :-(
Post Reply