PC Review


Reply
Thread Tools Rate Thread

How to detect double byte character fields ?

 
 
=?Utf-8?B?QkIgcHJvZ3JhbW1lcg==?=
Guest
Posts: n/a
 
      21st Apr 2006
Hello,

I often need to work with double byte character fields (Japanese characters)
in my Access application. Now I have 2 questions.
1. How can I detect double byte character in a field ?
2. If possible, I want to convert double byte alphabet character to single
byte alphabet character. For example, if a field contains double byte
character "APPLE" (entry using Japanese character input method), I want to
convert it into single byte character "APPLE" (pure English character).

Any clue for this ?
thanks
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWFydGlu?=
Guest
Posts: n/a
 
      21st Apr 2006
TypeName() is a useful function but I'm not sure if it includes double byte
character variables.

"BB programmer" wrote:

> Hello,
>
> I often need to work with double byte character fields (Japanese characters)
> in my Access application. Now I have 2 questions.
> 1. How can I detect double byte character in a field ?
> 2. If possible, I want to convert double byte alphabet character to single
> byte alphabet character. For example, if a field contains double byte
> character "APPLE" (entry using Japanese character input method), I want to
> convert it into single byte character "APPLE" (pure English character).
>
> Any clue for this ?
> thanks

 
Reply With Quote
 
John Nurick
Guest
Posts: n/a
 
      21st Apr 2006
If you're working in Access 2000 or later, use a Unicode font and
questions like this become academic.

I've no experience with older double-byte character sets, and am
mystified by your distinction between a double-byte "APPLE" and a
single-byte one. You may be able to get somewhere by using AscW() and
Chr(). For instance, if C is a one-byte character (e.g. Latin "A")
encoded in two bytes,
C = Chr(AscW(C))
should (I think) be true, while if it's a double-byte Japanese character
it will be false.





On Thu, 20 Apr 2006 22:49:02 -0700, BB programmer
<(E-Mail Removed)> wrote:

>Hello,
>
>I often need to work with double byte character fields (Japanese characters)
>in my Access application. Now I have 2 questions.
>1. How can I detect double byte character in a field ?
>2. If possible, I want to convert double byte alphabet character to single
>byte alphabet character. For example, if a field contains double byte
>character "APPLE" (entry using Japanese character input method), I want to
>convert it into single byte character "APPLE" (pure English character).
>
>Any clue for this ?
>thanks


--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing fonts -- double-byte vs. single-byte Kamran Microsoft Powerpoint 5 23rd Oct 2009 01:28 PM
Double byte (Japanese) character question John B Microsoft Access Queries 0 28th Nov 2007 01:20 PM
Burn CD with double byte character Mike Computer Hardware 0 28th Mar 2006 05:52 AM
Double-byte character handling in database Lau Lei Cheong Microsoft ASP .NET 0 15th Jun 2004 02:48 AM
Using DSOleFile to read double-byte character file DevUser Microsoft Dot NET Framework 0 5th May 2004 03:44 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:41 AM.