Sign in to follow this  
Followers 0
smus

How to encode a cyrillic string from unicode to utf-8?

11 posts in this topic

When I read from my MS Access database(unicode), the Cyrillic characters are not being written correctly in browser(utf-8).

How to encode the data by VBScript in real time or how to convert it manually in MS Access?

 

This is what I've found on this topic, but it seems to be quite complicated: http://stackoverflow.com/questions/22054934/capture-and-insert-unicode-text-cyrillic-into-ms-access-database/22072399#22072399

 

 

Share this post


Link to post
Share on other sites

Based on that Stack Overflow post it looks like the secret is to insert the data using the correct method, not try to convert it when you read it.

Share this post


Link to post
Share on other sites

The data is originally in *.mdb file and used to be displayed as non-latin characters through question marks (??????).

They have been changed to a usual abrakadabra (Вокруг Ñвета) after I've added the string to the top of the page: "<%@ CODEPAGE = 65001 %>"

Edited by smus

Share this post


Link to post
Share on other sites

OK. So it still sounds like the data was not inserted in the database correctly to begin with.

Share this post


Link to post
Share on other sites

Yes. You're right, it is definitely better to place the data than to convert it, but I inserted it manually in MS Access 2013. I couldn't find how to encode it there and tried to do so by exporting to Excel, then saving to *.csv, then converting it in AkelPad from Cyrillic-DOS866 (This one happened to be in MS Access by default, I don't know why), then back to Excel and again back to Access, but it's still the same. There has to be the same feature as in MySQL's PHPMyAdmin to switch an encoding for the fields in the tables, but I cannot find one.

Share this post


Link to post
Share on other sites

I don't know if that exists. Microsoft recommends that Access is not used for web site data, I imagine that things like that are part of the reason why. Access isn't a very robust database system, it was designed to be easy to use for office types who don't know much about databases. Microsoft recommends SQL Server for dealing with websites.

Share this post


Link to post
Share on other sites

The SQL Server is really powerful (the more powerful might be only Oracle DB), but, of course, more complicated! I've got not so much data (just one table with approximately less than 200 records) and not sure I should place it in SQL Server database. The thing is that the Access, in spite of its modest possibilities, attracts due to its simplicity of approach and visibility of the data storage. However, the idea of converting the data is reasonable and I will think it through, if I can't find the way to deal with non-latin symbols.

 

Is that hard to convert from Access to SQL server?

Edited by smus

Share this post


Link to post
Share on other sites

It shouldn't be, if you wrote your code the right way. The only thing you should need to change would probably be the connection string.

Share this post


Link to post
Share on other sites

Right. Then just one more question: in which file format does SQL Server store the data? What is its native DB file format?

Share this post


Link to post
Share on other sites

A typical database in SQL Server has a .mdf file and a .ldf file, but you do not work with files directly when you're using SQL Server. The database server manages the files itself, you interact with the server. You don't open the file, for example, you start the server and connect to it to run queries.

1 person likes this

Share this post


Link to post
Share on other sites

OK. I guess, it is very much like in MySQL. *mdb and *mdf are both Microsoft's format, so the convertion wouldn't be difficult I hope.

 

Thank you for information!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0