ANSI text for utf-8

Asked

Viewed 251 times

-2

I wanted to know if it has how to convert text that were utf-8 and was placed in ANSI, with that it gave error and in place of accents, are other letters totally messed and codes

I wonder if you have something like this in sql server, but if not, any application or website serves.

  • What do you mean by ANSI (American National Standards Institute)? I don’t know any character encoding called ANSI. The ASCII (American Standard Code for Information Interchange) table includes only 128 signs and characters (7 bits). If you are referring to the commonly known "extended ASCII table" then search for the ISO-8859-x series, where x varies from 1 to 16, which use the other 128 characters that can be represented in one byte for specific characters in a series of languages (ISO-8859-1 is Western European).

  • Currently it is recommended the use of UTF-8 that maps the approximately 109 thousand characters defined by the theoretical standard of the UNICODE consortium.

  • @anonimo Although the term ANSI is vague, it is widely used and usually refers to the codepage Windows-1252.

  • In this case only make the appropriate conversion between coding systems.

1 answer

1

In versions of SQL Server currently supported by Microsoft it is recommended to use UTF-16 encoding.

Unicode is a standard for mapping code points to characters. How it is designed to span all characters of all languages world, does not need different code pages to handle the different character sets. If you store data from character that reflects multiple languages in SQL Server (SQL Server 2005 (9.x) to SQL Server 2017), use Unicode data types (UTF-16) (nchar, nvarchar and ntext) instead of non-Unicode data types (char, varchar and text).

Reference: Unicode stand

Interestingly, in very old versions of SQL Server (e.g. SQL Server 7.0 or 2000), Unicode UCS-2 was used. It was then necessary to convert between UTF-8 and UCS-2, this reference provides some of the options of how it dealt with the problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.