Page 1 of 1

DebuggerWarning does not support Unicode

Posted: Fri Oct 18, 2024 3:28 am
by Webarion
I don't understand why DebuggerWarning doesn't support the Unicode string. Instead of a message there is a question mark ????????

Re: DebuggerWarning does not support Unicode

Posted: Fri Oct 18, 2024 6:05 am
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.

Re: DebuggerWarning does not support Unicode

Posted: Sun Oct 20, 2024 12:30 am
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$)

Re: DebuggerWarning does not support Unicode

Posted: Sun Oct 20, 2024 1:24 am
by BarryG
Confirmed here with a clean install with 6.10 (I know, not the latest):

Image

Re: DebuggerWarning does not support Unicode

Posted: Sun Oct 20, 2024 2:06 am
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

Re: DebuggerWarning does not support Unicode

Posted: Sun Oct 20, 2024 2:21 am
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.

Re: DebuggerWarning does not support Unicode

Posted: Sun Oct 20, 2024 2:45 am
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