Strange outpug from debug?

Just starting out? Need help? Post your questions and find answers here.
highend
Enthusiast
Enthusiast
Posts: 169
Joined: Tue Jun 17, 2014 4:49 pm

Strange outpug from debug?

Post by highend »

Hi,

something's very odd atm...

PureBasic v6.21 x64 (IDE), Compiler: v6.04 LTS x64

Code:

Code: Select all

Debug "D:\250807_Analyse_Bereinigung_Pfadlängen_Files.txt"
The .pb file is UTF-8 with BOM.

I get this output:
Image

Why is that?
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Strange outpug from debug?

Post by infratec »

:?: :?: :?:

It does exactly what it should.
It prints the string which you added behind.

What does you expect?
highend
Enthusiast
Enthusiast
Posts: 169
Joined: Tue Jun 17, 2014 4:49 pm

Re: Strange outpug from debug?

Post by highend »

No it doesn't :mrgreen:

The string to output contains "ä" but the output doesn't display an "ä" but an "a" followed by an "n" with some dots above it
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Strange outpug from debug?

Post by infratec »

My output looks like this:
D:\250807_Analyse_Bereinigung_Pfadlängen_Files.txt
What language is used for the IDE? In my case it is german.

And in settings, what is your font for the debug window? I use consolas west
Last edited by infratec on Mon Sep 01, 2025 12:49 pm, edited 1 time in total.
Fred
Administrator
Administrator
Posts: 18199
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Strange outpug from debug?

Post by Fred »

Is your file in UTF-8 format ? You can check in Menu File -> File Format -> UTF8
highend
Enthusiast
Enthusiast
Posts: 169
Joined: Tue Jun 17, 2014 4:49 pm

Re: Strange outpug from debug?

Post by highend »

What language is used for the IDE? In my case it is german.

And in settings, what is your font for the debug window? I use consolas west
My IDE is set to english and the (custom) font used for the debug window is Consolas (which never had issues to display german special chars). Changing it to Segoe UI doesn't change the weird display of that string.
Is your file in UTF-8 format ? You can check in Menu File -> File Format -> UTF8
Yes it is. Encoding: Utf8
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Strange outpug from debug?

Post by infratec »

What's the output if you open a new code window and put this debug line inside, without anything else?
(That's what I did)
highend
Enthusiast
Enthusiast
Posts: 169
Joined: Tue Jun 17, 2014 4:49 pm

Re: Strange outpug from debug?

Post by highend »

Still the same output :oops:

Image
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Strange outpug from debug?

Post by infratec »

That's very strange, because here it works correct.

Forget the following...

In reality, the path is in a variable isn't it?

Use

Code: Select all

ShowMemoryViewer(@path$, StringByteLength(path$))
Last edited by infratec on Mon Sep 01, 2025 1:07 pm, edited 2 times in total.
Fred
Administrator
Administrator
Posts: 18199
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Strange outpug from debug?

Post by Fred »

Tried here with consolas as well and it works as expected. Strange issue for sure !
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Strange outpug from debug?

Post by infratec »

Or please try that:

Code: Select all

path$ = "D:\250807_Analyse_Bereinigung_Pfadlängen_Files.txt"
Debug path$

ShowMemoryViewer(@path$, StringByteLength(path$))
61 00 64 00 6C 00 E4 00 6E 00 67 00 65 00 6E 00 a.d.l.ä.n.g.e.n.
The ä is represented by 00 E4 (E4 00)
highend
Enthusiast
Enthusiast
Posts: 169
Joined: Tue Jun 17, 2014 4:49 pm

Re: Strange outpug from debug?

Post by highend »

Image

When I change it to "String View (Unicode)" the output is correct (as well in Hex View)^^
User avatar
Kiffi
Addict
Addict
Posts: 1497
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Strange outpug from debug?

Post by Kiffi »

Just a guess: Did you copy the path from somewhere into the clipboard and paste it into the IDE? What happens when you type

Code: Select all

Debug "äöüÄÖÜ"
?
Hygge
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Strange outpug from debug?

Post by infratec »

Please use 'Hex' so that the codes of the characters are visible.
highend
Enthusiast
Enthusiast
Posts: 169
Joined: Tue Jun 17, 2014 4:49 pm

Re: Strange outpug from debug?

Post by highend »

Just a guess: Did you copy the path from somewhere into the clipboard and paste it into the IDE? What happens when you type
The guess is correct...

When I copy your "äöüÄÖÜ" here from the forum into the IDE, the output is correct, when I do the same with the path I posted, it is shown correctly. If i copy it out of the my editor (Sublime Text) or from the file manager, it's not correct...
Post Reply