DebuggerWarning does not support Unicode

Post bugs related to the IDE here
Webarion
User
User
Posts: 30
Joined: Tue Sep 14, 2021 8:50 pm

DebuggerWarning does not support Unicode

Post by Webarion »

I don't understand why DebuggerWarning doesn't support the Unicode string. Instead of a message there is a question mark ????????
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: DebuggerWarning does not support Unicode

Post by AZJIO »

1. Can you give me a code to check that is guaranteed to give the problem?
2. Check that the “Catalogs\Russian” files are in UTF-8 encoding.

I had the problem sometimes, but I put off researching the cause. Now I checked that my files were in Win1251 encoding. Now if you give me an example, I'll check that it will give me squares instead of meaningful text.
Webarion
User
User
Posts: 30
Joined: Tue Sep 14, 2021 8:50 pm

Re: DebuggerWarning does not support Unicode

Post by Webarion »

AZJIO wrote: Fri Oct 18, 2024 6:05 am 1. Can you give me a code to check that is guaranteed to give the problem?
2. Check that the “Catalogs\Russian” files are in UTF-8 encoding.

I had the problem sometimes, but I put off researching the cause. Now I checked that my files were in Win1251 encoding. Now if you give me an example, I'll check that it will give me squares instead of meaningful text.
My translation files are all UTF-8 with BOM. For example, this code doesn't work:

Code: Select all

DebuggerWarning( "Внимание, этот тип данных может существовать только в ядре конструктора!" )
I don't understand why this should depend on the file encoding if we specify a Unicode string in DebuggerWarning(...)
This also applies to DebuggerError(Message$)
BarryG
Addict
Addict
Posts: 4178
Joined: Thu Apr 18, 2019 8:17 am

Re: DebuggerWarning does not support Unicode

Post by BarryG »

Confirmed here with a clean install with 6.10 (I know, not the latest):

Image
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: DebuggerWarning does not support Unicode

Post by AZJIO »

I tried to guess which encoding the data is being read in.

Code: Select all

*x = UTF8("Внимание, этот тип данных может существовать только в ядре конструктора!")
DebuggerWarning(PeekS(*x, -1, #PB_Ascii))
FreeMemory(*x)
more

Code: Select all

s$ = "Внимание, этот тип данных может существовать только в ядре конструктора!"
*x = AllocateMemory(StringByteLength(s$, #PB_UTF8) + 2)
If *x
	PokeS(*x, s$, -1, #PB_UTF8)
	DebuggerWarning(PeekS(*x, -1, #PB_Ascii))
	FreeMemory(*x)
EndIf
Webarion
User
User
Posts: 30
Joined: Tue Sep 14, 2021 8:50 pm

Re: DebuggerWarning does not support Unicode

Post by Webarion »

AZJIO wrote: Sun Oct 20, 2024 2:06 am I tried to guess which encoding the data is being read in.

Code: Select all

*x = UTF8("Внимание, этот тип данных может существовать только в ядре конструктора!")
DebuggerWarning(PeekS(*x, -1, #PB_Ascii))
FreeMemory(*x)
more

Code: Select all

s$ = "Внимание, этот тип данных может существовать только в ядре конструктора!"
*x = AllocateMemory(StringByteLength(s$, #PB_UTF8) + 2)
If *x
	PokeS(*x, s$, -1, #PB_UTF8)
	DebuggerWarning(PeekS(*x, -1, #PB_Ascii))
	FreeMemory(*x)
EndIf
Yes, this helps thanks!
But still this is a "dance with a tambourine".
I think this should be resolved within the IDE.
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: DebuggerWarning does not support Unicode

Post by AZJIO »

Webarion wrote: Sun Oct 20, 2024 2:21 am But still this is a "dance with a tambourine".
Dancing with a tambourine.. In the case of this idiom, the most understandable translation for a native English speaker will be Shaman's Dance with a Shaman's Drum...
Do some smoke and mirrors
rocket science
I want to do it without all this song and dance
Post Reply