Ucase() fails with UTF

Just starting out? Need help? Post your questions and find answers here.
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Ucase() fails with UTF

Post by Demivec »

Olli wrote: Sun Jul 16, 2023 10:18 am But... Who has adopted the black horse in the chess set ? :lol:
Batman?
Olli
Addict
Addict
Posts: 1202
Joined: Wed May 27, 2020 12:26 pm

Re: Ucase() fails with UTF

Post by Olli »

:lol:

I used it

Code: Select all

*cm\cm('♞') = 0   ; We insure ourselves we keep the horse...
...here...
User avatar
Torf
User
User
Posts: 13
Joined: Thu Apr 27, 2023 8:03 pm

Re: Ucase() fails with UTF

Post by Torf »

I attach a screenshot:

https://ibb.co/yfSJTL3
User avatar
idle
Always Here
Always Here
Posts: 5840
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Ucase() fails with UTF

Post by idle »

Torf wrote: Wed Jul 19, 2023 10:48 am I attach a screenshot:

https://ibb.co/yfSJTL3
Sorry for delay in reply, that does look odd. What is your OS version?
User avatar
Torf
User
User
Posts: 13
Joined: Thu Apr 27, 2023 8:03 pm

Re: Ucase() fails with UTF

Post by Torf »

idle wrote: Fri Jul 21, 2023 10:11 am
Torf wrote: Wed Jul 19, 2023 10:48 am I attach a screenshot:

https://ibb.co/yfSJTL3
Sorry for delay in reply, that does look odd. What is your OS version?
I'm using a macbook with chip Intel and macOS Monterey, v.12.6.3

In Windows 10 and Windows XP it runs ok, the problem I only see with macOS (I didn't test it with Linux)
User avatar
Sicro
Enthusiast
Enthusiast
Posts: 559
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

Re: Ucase() fails with UTF

Post by Sicro »

@Torf

What are the outputs for the following code?

Code: Select all

Debug Asc("ñ")
Debug Asc(UCase("ñ"))

Code: Select all

; Download from https://dnscope.io/idlefiles/UTF16.pb
IncludeFile "UTF16.pb"

Define text$ = "ñ"
UTF16::StrUCase(text$)
Debug text$
Image
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
User avatar
Torf
User
User
Posts: 13
Joined: Thu Apr 27, 2023 8:03 pm

Re: Ucase() fails with UTF

Post by Torf »

Sicro wrote: Fri Jul 21, 2023 1:47 pm @Torf

What are the outputs for the following code?

Code: Select all

Debug Asc("ñ")
Debug Asc(UCase("ñ"))
https://ibb.co/1QWK07K

Code: Select all

; Download from https://dnscope.io/idlefiles/UTF16.pb
IncludeFile "UTF16.pb"
Define text$ = "ñ"
UTF16::StrUCase(text$)
Debug text$
https://ibb.co/Lv5Wp9q
I paste screenshots below each question.
User avatar
idle
Always Here
Always Here
Posts: 5840
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Ucase() fails with UTF

Post by idle »

Think you should try to update to pb 6.02 lts or 6.03. Something isn't right
User avatar
Torf
User
User
Posts: 13
Joined: Thu Apr 27, 2023 8:03 pm

Re: Ucase() fails with UTF

Post by Torf »

idle wrote: Sat Jul 22, 2023 10:55 am Think you should try to update to pb 6.02 lts or 6.03. Something isn't right
https://ibb.co/yqGqTxW
Post Reply