V2: \ is shown as ¥ in some situation perhaps due to font problem

Report problems with documented functionality
User avatar
V2User
Posts: 195
Joined: 30 Apr 2021, 04:04

V2: \ is shown as ¥ in some situation perhaps due to font problem

07 Jan 2023, 05:41

\ is shown as in a string in some situations, perhaps due to a merely small font problem.
4K{$(0Z~MI(D_)57UG63T%N.png
4K{$(0Z~MI(D_)57UG63T%N.png (55.35 KiB) Viewed 929 times
User avatar
boiler
Posts: 16983
Joined: 21 Dec 2014, 02:44

Re: V2: \ is shown as ¥ in some situation perhaps due to font problem

07 Jan 2023, 09:13

I don’t know if this is your case, but someone had a similar issue where in their location, what were typically considered “normal” ANSI characters were showing other symbols like that. It was solved by acting as if Unicode characters were being used, and saving the script using “UTF-8 with BOM” encoding. Try that and see if that solves the problem.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: V2: \ is shown as ¥ in some situation perhaps due to font problem

07 Jan 2023, 10:44

no, this has nothing to do with the scripts encoding. this is usually observed on korean computers. if u change ur regional locale back to English in windows, the path will render correctly
if u dont change ur locale, theres some fuckery going on with the richedit control and the Unicode Character “▶” (U+25B6) symbol and the way its trying to automatically select an appropriate font to use. if u leave it as is, it seems to pick MS UI Gothic(why that one, i dont know), in which the backslashes are mapped to funny currency symbols
image.png
image.png (13.98 KiB) Viewed 870 times
image.png
image.png (20.03 KiB) Viewed 870 times

ive had some limited success with setting

Code: Select all

cf.dwMask = CFM_CHARSET;
cf.bCharSet = SYMBOL_CHARSET;
but i dont know if this isnt breaking something else(most likely it is)

otherwise u could tell it to print the remainder of that one line with a different font in which the backslashes arent mapped to funny currency symbols

Code: Select all

cf.dwMask = CFM_FACE;
wcscpy(cf.szFaceName, L"Segoe UI Symbol");
SendMessage(re, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
image.png
image.png (22.54 KiB) Viewed 870 times
User avatar
boiler
Posts: 16983
Joined: 21 Dec 2014, 02:44

Re: V2: \ is shown as ¥ in some situation perhaps due to font problem

07 Jan 2023, 11:14

OK. Just noting that saving with that encoding solved what looked like a similar issue with the exact same character for an Asian language locale.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: V2: \ is shown as ¥ in some situation perhaps due to font problem

07 Jan 2023, 12:09

just tried it with and without bom but nothing changed(output still garbled)
User avatar
V2User
Posts: 195
Joined: 30 Apr 2021, 04:04

Re: V2: \ is shown as ¥ in some situation perhaps due to font problem

08 Jan 2023, 05:29

@swagfag @boiler
Thanks for your answer. In fact, I don't know much about the bug. I only see the bug from my friend's screen capture. I even don't know how to reproduce it currently. All what I do is reporting. Perhaps someone of my country will further explain it again.
lexikos
Posts: 9592
Joined: 30 Sep 2013, 04:07
Contact:

Re: V2: \ is shown as ¥ in some situation perhaps due to font problem

18 Jun 2023, 05:00

I changed the locale on my Windows 7 VM to Korean, and I get a different symbol altogether. It not only shows in the v2 error dialog, but also in Explorer's Properties dialogs.

If I apply SYMBOL_CHARSET to the whole line, my Windows 7 VM renders the arrow as ¶ instead, while the rest of the line looks fine.
lexikos
Posts: 9592
Joined: 30 Sep 2013, 04:07
Contact:

Re: V2: \ is shown as ¥ in some situation perhaps due to font problem

15 Mar 2024, 21:55

Some time since my last post, I saw Explorer displaying a file path with ¥ instead of backslash... in a scene on Netflix. I wondered if it is such a common occurrence that users in some locales would see it as normal, like ¥ is just another path separator.
Japanese and Korean versions of Windows may often display the '¥' character or the '₩' character instead of the directory separator. In such cases the code for a backslash is being drawn as these characters.
Source: Path (computing) - Wikipedia
Windows code page and OEM character sets used on Japanese-language systems contain the Yen symbol (¥) instead of a backslash (\). Thus, the Yen character is a prohibited character for NTFS and FAT file systems. When mapping Unicode to a Japanese-language code page, conversion functions map both backslash (U+005C) and the normal Unicode Yen symbol (U+00A5) to this same character.
Source: Security Considerations: International Features - Win32 apps | Microsoft Learn
So ¥ can't appear in an NTFS filename, and must only be a path separator (or invalid).
User avatar
thqby
Posts: 408
Joined: 16 Apr 2021, 11:18
Contact:

Re: V2: \ is shown as ¥ in some situation perhaps due to font problem

15 Mar 2024, 22:44

lexikos wrote: So ¥ can't appear in an NTFS filename, and must only be a path separator (or invalid).
On my computer, ¥ can be used as the NTFS file name. Is it backslash \ that appears as ¥ in a specific font?
lexikos
Posts: 9592
Joined: 30 Sep 2013, 04:07
Contact:

Re: V2: \ is shown as ¥ in some situation perhaps due to font problem

15 Mar 2024, 23:12

How would you interpret the Microsoft documentation I quoted above?

Perhaps this is more enlightening.
In practice, after many years of code page based systems in Japan and Korea using their respective currency symbols as the path separators, it is believed customers were simply used to this appearance. And there was therefore little interest in changing that appearance (when the system settings were Japanese or Korean) to anything but those symbols.

To support this expectation, Japanese and Korean fonts, whenever the default system locale is set to Japanese or Korean, respectively, will display the currency symbol rather than the backslash when U+005c is shown.
Source: When is a backslash not a backslash?
If you want to see a reverse solidus aka backslash when looking at U+005c on a Korean or Japanese system, then you just aren't going to get what you want.

It's what enough people in Japan and Korea want to keep it this way forever, just about.
Source: At long last, explaining the yen/won/backslash bug plausibly
(The last one also has a bunch of links to other blog posts discussing yen/won/backslash.)
ahk7
Posts: 575
Joined: 06 Nov 2013, 16:35

Re: V2: \ is shown as ¥ in some situation perhaps due to font problem

16 Mar 2024, 04:05

I think ¥ as \ is common in Asia, I see it "all the time" in Japanese software and pages, for example look at the screenshots of fastcopy https://fastcopy.jp/ or this Cmd prompt for a 16bit emulator (so you can use 16bit dos in 64bit computers) http://takeda-toshiya.my.coocan.jp/msdos/200415-1.png

Apparently https://en.wikipedia.org/wiki/Backslash#Confusion_with_%C2%A5_and_other_characters

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 55 guests