Question on Access 2000 character set (UTF-16 or UCS-2?) (1 Viewer)

Papa_Bear1

Member
Local time
Today, 12:25
Joined
Feb 28, 2020
Messages
53
I need to determine if Access 2000 (Jet/ADO 4.0) supports the full UTF-16 Unicode encoding standard or if it only supports UCS-2. Anyone know this?
(Apparently various resources out there have inconsistent info - indicating it is UTF-16, while still asserting it uses 2 bytes per character - which is self-inconsistent...)
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 11:25
Joined
Feb 28, 2001
Messages
27,175
I'm not going to swear to this because the search became very complex. I saw the inconsistent answers you mentioned.

Based on a few articles I found, I don't think that Access EVER actually stored data as UTF. It can do some translation-type things but literal UTF processing.
 

MarkK

bit cruncher
Local time
Today, 09:25
Joined
Mar 17, 2004
Messages
8,181
Quick test on a string field in an ACE table using DAO...
Code:
Sub TestACEBytesPerStringCharacter
    Dim b() As Byte
    Dim var
    
    With CurrentDb.OpenRecordset("tTestData")
        b = .Fields("Value").Value
        For Each var In b
            Debug.Print var;
        Next
        .Close
    End With
        
End Sub
See how you can directly assign a string to byte array? Anyway, looks like Unicode at two bytes per character.
Code:
84  0  104  0  105  0  115  0  32  0  105  0  115  0  32  0  97  0  32  0  116  0  101  0  115  0  116  0
But run that code in Access 2000 and you will be able to test Jet. Modify it to use an ADO recordset and you have your answer.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:25
Joined
May 7, 2009
Messages
19,237
See how you can directly assign a string to byte array? Anyway, looks like Unicode at two bytes per character.
this does not Prove anything?
byte array from string are just that: asci code + 0
 
Last edited:

Papa_Bear1

Member
Local time
Today, 12:25
Joined
Feb 28, 2020
Messages
53
I'm not going to swear to this because the search became very complex. I saw the inconsistent answers you mentioned.

Based on a few articles I found, I don't think that Access EVER actually stored data as UTF. It can do some translation-type things but literal UTF processing.
OK... Thanks for looking into it!
 

Papa_Bear1

Member
Local time
Today, 12:25
Joined
Feb 28, 2020
Messages
53
Quick test on a string field in an ACE table using DAO...
Code:
Sub TestACEBytesPerStringCharacter
    Dim b() As Byte
    Dim var
   
    With CurrentDb.OpenRecordset("tTestData")
        b = .Fields("Value").Value
        For Each var In b
            Debug.Print var;
        Next
        .Close
    End With
       
End Sub
See how you can directly assign a string to byte array? Anyway, looks like Unicode at two bytes per character.
Code:
84  0  104  0  105  0  115  0  32  0  105  0  115  0  32  0  97  0  32  0  116  0  101  0  115  0  116  0
But run that code in Access 2000 and you will be able to test Jet. Modify it to use an ADO recordset and you have your answer.
OK --- "This is a test" --- It indeed looks like 2 bytes per char. in your case... Will try to look at it this way. Thanks!
 

Papa_Bear1

Member
Local time
Today, 12:25
Joined
Feb 28, 2020
Messages
53
this does not Prove anything?
byte array from string are just that: asci code + 0
Hmmmm... So, does this not show that 2 bytes are used? You're saying this will always output 2 bytes per character, regardless of the system you're in?
 

Users who are viewing this thread

Top Bottom