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

Papa_Bear1

Member
Local time
Yesterday, 20:43
Joined
Feb 28, 2020
Messages
105
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...)
 
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.
 
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.
 
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:
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!
 
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!
 
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

Back
Top Bottom