Submitted by FleminBraante on 2019/12/16 22:11
I copied and pasted Chinese passages onto the document pane in text, unicode text and html text. The encoding didn't work well, generating a lot of  "?" or simply weird characters. The software crashed after I created a new markdown file in the document pane and pasted the same Chinese passage onto it. Now I avoid it by creating a MHT file in the document pane and edit the file in an external editor.
 
The forum has talked about this issue (http://infoqubeim.com/drupal5/?q=node/4076#comments). Is it a persistent issue? How can I have the characters encoded correctly?Thanks.

Comments

Hi and welcome to the IQ community forum !
 
There is a setting regarding encoding which was introduced and is still in test, perhaps it can help:
  • Tools > Options > Program > Document pane > Use UTF-8 when loading Doc pane (1.4.14)
 
Also, make sure you use a Unicode font
 
 
Try it and please report back !
 
 
Pierre_Admin
IQ Designer
 

FleminBraante

2019/12/17 15:31

In reply to by Pierre_Admin

Hello Pierre,
 
Thanks for your reply and your work all along! I am not sure about whether I am using Unicode font. I just created a blank IQ database, copied a Chinese sentence from Analects from the search result in Google and pasted it onto the document pane in html format and had the " Use UTF-8 when loading Doc pane" checked. This did not work well as the attached screenshot shows. My PC's current language for non-Unicode programs is set as Japanese (Japan). Did I miss something in the setup? Though it's not that serious since I can avoid it by using MHT file in the Doc pane. Thanks!
 
 

FleminBraante

2019/12/18 18:04

In reply to by Pierre_Admin

Hello Pierre,
 
I have replicated what you have recommended (check "Use UTF-8 when loading Doc pane", set @Arial Unicode) from the sample you have given above and I pasted the Japanese passage in text. At the beginning it worked just like your screenshot, but the characters are placed horizontally (90 degree anti-clockwise), and they became a mess when the Doc pane was closed and opened again:
 
 
I repeated the same steps for Chinese characters but it worked similarly. At first the characters were encoded correctly but they were placed 90 degree anti-clockwise. Then they become something else when the Doc pane was closed and opened again.
 
 
Sorry about bugging you

Pierre_Admin

2019/12/18 19:14

In reply to by FleminBraante

Strange indeed, as this issue was fixed a long time ago, at least I thought
 
Can you:
  1. Report back the HTML code for a blank item, and
  2. Attach an IQBase with a fresh paste of Asian text
Thanks !
 
Pierre_Admin
IQ Designer
 

 
Hi Pierre, I always face the same problem. I solve this by change system language settings "Language for non-Unicode programs" to English. But as I was said, this is not a perfect method, cause many other problems, e.g. some Unicode program's UI may not show characters correctly; files and folders that use unicode will apply a ugly font. So I prefer to set "Language for non-Unicode programs" to my primary language "Chinese".
 
Let me describe the problem in more detail:
Computer Settings: Windows display languge was English;
                                Preferred languages were English(United States), 中文;
                                Region was China,
                                Region format was English(United States)
Every test create a new blank IQBase.
 
1. Set "Language for non-Unicode programs" to "Chinese" and Check "Use UTF-8 when loading Doc pane"
 
    1.1 When typing directly, before closing, it's OK, but after close and reopen, it turns to "??"
 
    HTML (before closing)
    <html><head><meta name="GENERATOR" content="InfoQube 0.9.114o"><meta charset="UTF-8"><link id="SSDef936" href="D:\Dropbox\Apps\InfoQube\Default.css" rel="stylesheet" type="text/css"></head>
<body topmargin="2" rightmargin="2" bottommargin="0" leftmargin="2" bgcolor="#ffffff"><div><font face="Microsoft YaHei UI">中国</font></div>
<div><br></div></body></html>
    HTML (after reopen)
    <html><head><meta name="GENERATOR" content="InfoQube 0.9.114o"><meta charset="UTF-8"><link id="SSDef936" href="D:\Dropbox\Apps\InfoQube\Default.css" rel="stylesheet" type="text/css"></head>
<body topmargin="2" rightmargin="2" bottommargin="0" leftmargin="2" bgcolor="#ffffff"><div><font face="microsoft yahei">??-???</font></div>
<div><br></div></body></html>
 
 
    1.2 When coping from Chrome,  at website https://support.google.com/?hl=zh-Hans and copy "应如何寻求帮助?"
 
    Different copy method caused different result:
    
    The "Text" method was correct.
 
    But, after closed and reopened:
    
    None was correct.
 
 
 
2. Set "Language for non-Unicode programs" to "Chinese" and Uncheck "Use UTF-8 when loading Doc pane"
 
    2.1 When typing directly, it's OK (Even after reopened)
    
    HTML
    <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="GENERATOR" content="InfoQube 0.9.114o">
<link id="SSDef936" href="D:\Dropbox\Apps\InfoQube\Default.css" rel="stylesheet" type="text/css"></head><body><meta name="GENERATOR" content="InfoQube 0.9.114o">
<div>中国</div></body></html>
 
 
    2.2 When coping from Chrome,  at website https://support.google.com/?hl=zh-Hans and copy "应如何寻求帮助?"
 
    Different copy method caused different result:
    
     The "Text" was right. When I closed and reopen, it stayed the same.
 
 
 
 
3. Set "Language for non-Unicode programs" to "English" and Check "Use UTF-8 when loading Doc pane"
 
    3.1 When typing directly, it's OK (Even after reopened)
 
    HTML
    <html><head><meta name="GENERATOR" content="InfoQube 0.9.114o"><meta charset="UTF-8"><link id="SSDef936" href="D:\Dropbox\Apps\InfoQube\Default.css" rel="stylesheet" type="text/css"></head>
<body topmargin="2" rightmargin="2" bottommargin="0" leftmargin="2" bgcolor="#ffffff"><div>中国</div><div><br></div></body></html>
 
 
    3.2 When coping from Chrome,  at website https://support.google.com/?hl=zh-Hans and copy "应如何寻求帮助?"
 
    Different copy method caused different result:
    
    The "HTML Format" and "Unicode Text" were right. When I closed and reopen, it stayed the same.
 
 
 
4. Set "Language for non-Unicode programs" to "English" and Uncheck "Use UTF-8 when loading Doc pane"
 
    4.1 When typing directly, it's OK (Even after reopened)
 
    HTML
    <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="GENERATOR" content="InfoQube 0.9.114o">
<link id="SSDef936" href="D:\Dropbox\Apps\InfoQube\Default.css" rel="stylesheet" type="text/css"></head><body><meta name="GENERATOR" content="InfoQube 0.9.114o">
<div>中国</div><div><br></div></body></html>
 
    4.2 When coping from Chrome,  at website https://support.google.com/?hl=zh-Hans and copy "应如何寻求帮助?"
 
    same as 3. Set "Language for non-Unicode programs" to "English" and Check "Use UTF-8 when loading Doc pane"
 

LM77

2020/11/05 04:23

In reply to by wenmin92

I'm encountering the same problem with Hebrew text (only when pasting text from other documents, e.g. Word, not when writing!), and I'm using the most recent version of IQ.
 
The problem exists regardless of whether I paste as Unicode or HTML, and it even exists when I paste internally in IQ (e.g., from a grid field with Hebrew text to the document pane).
 
I was able to solve the problem by changing the regional setting on my computer for non-Unicode to English, but this created problems with regard to other programs which I use.
 
Any ideas about a possible solution?
 
Thanks!

LM77

2022/02/20 07:22

In reply to by LM77

One more relevant point about this (I'm using 119e of course): in the Doc pane the foreign text is encoded correctly; only in the Grids it is not.

Indeed, if I try to copy text from a grid to the doc pane - regardless of whether I paste as RTF, HTML or Unicode - the text is rendered incorrectly in the Doc pane (albeit in different ways, depending on how I pasted).

Only by changing the regional settings in Windows can I ensure that copying from the grid to the Doc pane works correctly, but, as indicated above, this wreaks havoc w/ regard to other programs I am using.

in v119g

  • Change: Clipboard  read / write code was changed to better handle all languages and regions. Please report if there are any issues with the new method

 

  • Change: Clipboard  read / write code was changed to better handle all languages and regions. Please report if there are any issues with the new method

Could this be why I am getting a weird problem where I when I paste English text it shows up in Chinese? (I have never used Chinese, so it was quite surprising to have it appear in IQ when doing normal copy/paste operations...) Or would it have something to do with the font I'm using? (When I look at Nirsoft Inside Clipboard, the contents look normal.)

Hi Lucas,

OK, let me check

[edit] It seems that the program you're using for copy from, is not providing a Unicode clipboard format (probably an old program). I fixed the ASCII clipboard format code. An update will be issued tomorrow

 

Many thanks, Pierre. Paste function now works perfectly. However, I now seem to have a problem with copy function. In a grid, using WYSIWYG, when I select some text within a cell, and press Control+C to copy, nothing happens, and nothing is registered on the clipboard. And when I right-click, the only options are for the entire cell, so the only way I can copy selected text is by opening Item Editor, where copy works normally. (I believe this is a new issue specific to this update.)

Bug reports