It is currently Tue Mar 02, 2021 2:49 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: [Done] Asian languages in editor gadget w10
PostPosted: Fri Oct 30, 2020 4:57 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed May 28, 2003 6:57 am
Posts: 196
Location: Munich
Some Asian languages do not show in the editor gadget.

+++ sample
Chinese:  善用佳软
Hindi: और ऐना साफ़
Korean: 배경 고정(시계모드)
Japanese: こんにちは、
+++

Chinese and Japanese are ok, but Hindi and Korean are not, although these show correctly in the PB string gadget, and in all other editors on my computer including the PB editor.

What is wrong?
Can anyone help me by copying the sample into the editor:

Code:
#width = 500 : #height = 400 : #title = "Editor Gadget Test "
#flags = #PB_Window_SystemMenu|#PB_Window_ScreenCentered
If OpenWindow(0,0,0,#width,#height,#title,#flags) : Else : End : EndIf
ListHandle = EditorGadget(1,0,0,#width,#height)
SetActiveGadget(1)
Repeat
  event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
End

_________________
Horst.


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget
PostPosted: Fri Oct 30, 2020 7:47 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Nov 09, 2011 8:58 am
Posts: 638
Can confirm, same issue here.

_________________
My new project: A simple HTML/CSS UI engine for PB desktop apps
viewtopic.php?f=7&t=74582


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget
PostPosted: Sat Oct 31, 2020 2:22 am 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1319
Confirmed here. The Hindi and Korean lines don't show what your sample shows when I copied and pasted your whole sample. They paste fine into Notepad, so it appears to be a PureBasic issue.

I noted that copying and pasting just the Korean line (Korean: 배경 고정(시계모드)) works, but then if you copy and paste just the Hindi text after it (और ऐना साफ़), it changes the EditorGadget by making the Korean text different and making the Hindi text look like squares:

Image

Image

Edited to show Notepad has no problem.


Last edited by BarryG on Sun Nov 01, 2020 9:46 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget
PostPosted: Sat Oct 31, 2020 12:49 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2883
Location: Germany
No problem here with copy and paste !?

PB v5.72, v5.73 (X64 Unicode)

OS:
- macOS Catalina (Hostsystem)
- Windows 7 Pro (VM)
- Ubuntu 18.04 (VM)

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget
PostPosted: Sat Oct 31, 2020 6:15 pm 
Offline
New User
New User

Joined: Fri Oct 30, 2020 6:59 pm
Posts: 7
What source are you copying and pasting from? If it's anything like Russian Cyrillic, there can be several codes used to write Hindi, Korean etc characters, and some of these encodings are incompatible with some programs.
For example, some Russian Cyrillic texts are fine, while some are displayed as strings of Latin letters with diacritic signs (like the ones used in Vietnamese or Polish), or as question marks.


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget
PostPosted: Sun Nov 01, 2020 1:59 am 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1319
Ural4320, I pasted the sample text into Notepad first, then cleared the clipboard, then copied the text from Notepad to ensure there was no other encoding (in case these forums were including hidden characters or encoding that I couldn't see). It still failed, with both PureBasic 5.72 32-bit and 64-bit for me. The results were as per my screenshots above.

What you said also doesn't explain why the EditorGadget changes the correct display of the first pasted text (Korean) when pasting the second language (Hindi) after it. I would expect the EditorGadget to stay the same.


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget
PostPosted: Sun Nov 01, 2020 5:55 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 3570
Location: New Zealand
I see no issue on linux. It displays

Quote:
Chinese:  善用佳软
Hindi: और ऐना साफ़
Korean: 배경 고정(시계모드)
Japanese: こんにちは、


what OS is this occurring on?


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget
PostPosted: Sun Nov 01, 2020 6:30 am 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1319
Windows 10 for me (see my screenshots).


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget
PostPosted: Sun Nov 01, 2020 6:30 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed May 28, 2003 6:57 am
Posts: 196
Location: Munich
I should have mentioned in my original post that I have these problems on a Windows 10 system.

@ Ural4320:
I have written a PB text display program with search function.
How do you explain that Korean does not show correctly in the editor gadget, while I can anter a Korean string in the search box, and it looks fine (and the search is successful)..

@Fred:
Should this thread be moved to the bugs section?

_________________
Horst.


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget
PostPosted: Sun Nov 01, 2020 9:44 pm 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1319
horst wrote:
Should this thread be moved to the bugs section?

Yes! My screenshots above show the obvious problem.


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget w10
PostPosted: Mon Nov 02, 2020 3:08 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14181
Location: France
That's wierd because we use a standard 'RichEdit20' component and we don't have any hook about copy/paste. It seems like Hindi is breaking the whole stuff here, all 3 other languages seems to work. I also tried to paste Hindi into a StringGadget() and it works, so it's not an unicode encoding issue in PB.


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget w10
PostPosted: Mon Nov 02, 2020 3:17 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Dec 17, 2009 12:00 pm
Posts: 215
Location: Llangadog, Wales, UK
Copy and paste into EditorGadget works correctly here, all characters appear fine :-

PB 5.73 beta 2 x64
Windows 7 Pro (sorry no Win10 system handy)
MX Linux Xfce 19.2

Is there a change to the default font with Win10 or something?

_________________
www.deeproot.co.uk


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget w10
PostPosted: Mon Nov 02, 2020 3:20 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14181
Location: France
I tried with different font, without success.


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget w10
PostPosted: Mon Nov 02, 2020 3:52 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Apr 12, 2009 6:27 am
Posts: 3880
Hi
It seems that PB Windows 10 is using Riched20.dll while it should use msftedit.dll

_________________
Egypt my love


Top
 Profile  
Reply with quote  
 Post subject: Re: Asian languages in editor gadget w10
PostPosted: Mon Nov 02, 2020 5:48 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14181
Location: France
You are right RASHAD ! Using the most recent RichEdit allows proper copy/paste of asian language. Fixed.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye