Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 10 of 22 total |
Chinese Charatcers & DBISAM V3.3 |
Wed, Oct 4 2006 2:28 AM | Permanent Link |
Hi,
Just wondering if there is a trick to using DBISAM v3.3 with Chinese Characters. I am using the TRichViewDB component, when I connect it to a BDE table, eveything works OK. When I connect to a DBISAM table, then I get ?????? characters.....what is the trick here.....any ideas? Regards Trevor Keegan | |
Wed, Oct 4 2006 5:06 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Trevor,
<< Just wondering if there is a trick to using DBISAM v3.3 with Chinese Characters. I am using the TRichViewDB component, when I connect it to a BDE table, eveything works OK. When I connect to a DBISAM table, then I get ?????? characters.....what is the trick here.....any ideas? >> You have to make sure that the font being used in the control is capable of displaying characters from the Chinese character set. The control has to specify the alternate character set being used also (Font.CharSet property). -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Oct 4 2006 7:36 PM | Permanent Link |
Hello Tim,
> You have to make sure that the font being used in the control is capable > of displaying characters from the Chinese character set. The control has > to specify the alternate character set being used also (Font.CharSet > property). This is what I do not understand....I have tried the following: 1. Connect the control to a Memo field in a BDE table ....... Result: Everything work well 2. Reconnect the control to a Memo field in a DBISAM table ...... Result: ????? (Question marks) replace the chinese characters 3. Change the Memo field in the DBISAM table to a Binary field ...... Result: Everything works well Questions: 1. I have a feeling though, based on what you have said that there should be no need for me to use a Binary field....I should be able to continue to use a Memo field......Is this correct? 2. I am just using the standard Chinese fonts in Windows XP.....I am selecting the Ping Ying font.....I have seen the Font.CharSet property but to be honest I am not really sure which do I select here.....I assume I should be using the ChineseBig5....do you know if this is correct? Sorry for the questions.....This is a the first time that I am trying this kind of thing Regards Trevor Keegan | |
Thu, Oct 5 2006 4:12 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Trevor,
<< This is what I do not understand....I have tried the following: 1. Connect the control to a Memo field in a BDE table ....... Result: Everything work well 2. Reconnect the control to a Memo field in a DBISAM table ...... Result: ????? (Question marks) replace the chinese characters >> The BDE can use transliteration to/from OEM characters depending upon the language driver, so the two aren't exactly comparable when it comes to character string storage and retrieval. << 3. Change the Memo field in the DBISAM table to a Binary field ...... Result: Everything works well >> How are you assigning the string to the memo/binary field ? Is the source string a WideString, or is it an ANSI string using multi-byte characters ? << 1. I have a feeling though, based on what you have said that there should be no need for me to use a Binary field....I should be able to continue to use a Memo field......Is this correct? >> Sure. << 2. I am just using the standard Chinese fonts in Windows XP.....I am selecting the Ping Ying font.....I have seen the Font.CharSet property but to be honest I am not really sure which do I select here.....I assume I should be using the ChineseBig5....do you know if this is correct? >> Not exactly, no, since I'm not entirely up on the Chinese character sets. I believe there are two different character sets used for Chinese. Dan Rootham deals a lot with these issues and he might be able to help. Dan, help ? -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Oct 5 2006 7:38 PM | Permanent Link |
Hello Tim,
> << 3. Change the Memo field in the DBISAM table to a Binary field ...... > Result: Everything works well >> > > How are you assigning the string to the memo/binary field ? Is the source > string a WideString, or is it an ANSI string using multi-byte characters ? I just using the TRichView components. I assume that that internally they are using the WideStrings and doing all of the correct things. Maybe I should not just assume here....maybe I should go and ask > Dan Rootham deals a lot with these issues and he might be able to help. > Dan, help ? Yes...Dan...Please...Help Regards Trevor Keegan | |
Fri, Oct 6 2006 9:03 AM | Permanent Link |
Dan Rootham | Trevor,
First of all a disclaimer. I have not used DBISAM with code pages, only with the third-party TNT Unicode controls. So any advice about Chinese code pages is theoretical (and may be wrong). You need to be very clear from the start: are you handling Chinese as a code page, are are you using Unicode? Someone asked earlier in this thread: << Is the source string a WideString, or is it an ANSI string using multi-byte characters ? >> You really need to provide the answer to that question... Anyway, I'm guessing that you are not using WideStrings, but are using this codepage: Microsoft Windows Codepage 950 (Traditional Chinese Big5). But it should really depend on your target audience: - codepage 950 is for Taiwan (traditional Chinese) - codepage 936 is for mainland China and Singapore (simplified Chinese) Here is a link which covers the topic of codepages: http://www.sisulizer.com/support/codepages.shtml If you are using a codepage, then you need to tell that to DBISAM when you first create the table. I don't have access to DBISAM right now, but when you create a table in DBSYS there is a list of available languages which will include Chinese (Simplified) and Chinese (Traditional). Get that bit right, and perhaps your problems will go away? The fact that your characters get scrambled to ????? might indicate that the table was not set up with the correct language. If you are using Unicode, it's different. You will need the TNT add-on Unicode components, and you will have to store your widestrings as binary data - at least until Elevate DB comes along. I'd say: easier to wait for Elevate DB if you need the Unicode route. Regards, Dan Lexicon Software Ltd, Bath, UK |
Fri, Oct 6 2006 4:14 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Dan,
Thanks very much for chipping in. I really appreciate it. << If you are using a codepage, then you need to tell that to DBISAM when you first create the table. I don't have access to DBISAM right now, but when you create a table in DBSYS there is a list of available languages which will include Chinese (Simplified) and Chinese (Traditional). Get that bit right, and perhaps your problems will go away? The fact that your characters get scrambled to ????? might indicate that the table was not set up with the correct language. >> Actually, in DBISAM the language settings are only used for string comparisons and sorting. It doesn't affect the storage at all, which is why the binary vs. memo field results that he is reporting are very odd. DBISAM doesn't care about memo vs. binary except in the sense of a NULL termination character for memo field strings. Thanks again, -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Oct 6 2006 4:16 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Trevor,
<< I just using the TRichView components. I assume that that internally they are using the WideStrings and doing all of the correct things. Maybe I should not just assume here....maybe I should go and ask >> Dan is correct, is you're using WideStrings then you may have an issue since there may be issues with converting back and forth from WideStrings to AnsiStrings. DBISAM only supports AnsiStrings, which means that you must use AnsiStrings with multi-byte character encoding for Chinese, Japanese, and other languages that require large character sets (> 256 chars). -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Oct 6 2006 7:04 PM | Permanent Link |
Hello Dan,
Thanks for your input. > First of all a disclaimer. I have not used DBISAM with code pages, only > with > the third-party TNT Unicode controls. So any advice about Chinese code > pages > is theoretical (and may be wrong). Understood, I appreciate the input of anyonoe who knows more than I.....I will have a glass of something and throw a handful of salt over my shoulder as I am reading this then > > You need to be very clear from the start: are you handling Chinese as a > code page, are are you using Unicode? Someone asked earlier in this > thread: > << Is the source string a WideString, or is it an ANSI string using > multi-byte characters ? >> > You really need to provide the answer to that question... I suspect that we are using the WideStrings because there is a UniCode property that we need to turn on in the control for each style that want to define. The Style then also allows us to define the CodePage and the font styles. Does this mean though, that if I am using WideString, that there is no need to use the CodePage?? > Anyway, I'm guessing that you are not using WideStrings, but are using > this codepage: > Microsoft Windows Codepage 950 (Traditional Chinese Big5). > > But it should really depend on your target audience: > - codepage 950 is for Taiwan (traditional Chinese) > - codepage 936 is for mainland China and Singapore (simplified Chinese) > > Here is a link which covers the topic of codepages: > http://www.sisulizer.com/support/codepages.shtml Thanks I will have a look at that > If you are using a codepage, then you need to tell that to DBISAM when > you first create the table. I don't have access to DBISAM right now, but > when > you create a table in DBSYS there is a list of available languages which > will > include Chinese (Simplified) and Chinese (Traditional). Get that bit > right, > and perhaps your problems will go away? The fact that your characters get > scrambled to ????? might indicate that the table was not set up with the > correct language. OK...I will have a look into this.....but this would then mean that if I would have to know in advance what type of language was going to be used. In my case I want to allow many....here in Malaysia we use English characters, Chinese and Tamil....just as a start.....and we have some people here who may want to use all 3 lanuages in 1. > If you are using Unicode, it's different. You will need the TNT add-on > Unicode > components, and you will have to store your widestrings as binary data - > at least until Elevate DB comes along. I'd say: easier to wait for Elevate > DB if > you need the Unicode route. OK...I will take a look at this. Regards Trevor Keegan | |
Fri, Oct 6 2006 7:09 PM | Permanent Link |
Hello Tim,
> Actually, in DBISAM the language settings are only used for string > comparisons and sorting. It doesn't affect the storage at all, which is > why the binary vs. memo field results that he is reporting are very odd. > DBISAM doesn't care about memo vs. binary except in the sense of a NULL > termination character for memo field strings. OK.....I find that when things start to go a little crazy, sometimes it is best to start with a clean sheet of paper and try doing something simple.....rather than struggling with the beast. So I will try to create a little application and see if I get the same problem.....if not then I know that there is something that I am doing wrong. Regards Trevor Keegan |
Page 1 of 3 | Next Page » | |
Jump to Page: 1 2 3 |
This web page was last updated on Tuesday, April 23, 2024 at 08:10 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |