Is there any way to store character in MS access without being changed?
1 次查看(过去 30 天)
显示 更早的评论
I am trying to store encrypted data in ms access but characters afters 128 change
eg. 'Ö¤crÉòaqÆrõ~C' is sent to access which is received as 'Ö¤crÉòaqÆrõ~C' missing or converted symbols.
is there any way to retrieve text without being changed.
1 个评论
Walter Roberson
2017-5-7
Your posting contains unprintable characters. Using HTML entity notation, your source string is
Ö¤crÉòaqƒÆrõ~’C
and the received string is
Ö¤crÉòaqÆrõ~C
回答(1 个)
Walter Roberson
2017-5-7
This appears to be a limitation in using unicode text in some versions of MS Access. See for example https://social.msdn.microsoft.com/Forums/en-US/5e129981-58af-4891-979f-cf31e3fdaaca/inserting-unicode-characters-into-an-ms-access-database?forum=adodotnetdataproviders
The characters that are failing are getting turned into char(26), which is the character that is returned if a source character cannot be translated into the target character set; see for more discussion
You could try a native2unicode() with UTF-8 specified, and unicode2native() on the way back. This would give you variable length byte arrays to be stored, by the way.
But really, you should just switch to storing byte arrays.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!