ENCODE PROBLEM WHEN SEARCHING FROM THE ASP Classic (SQL SERVER)

Asked

Viewed 83 times

-1

All Asp pages are as UTF-8.

I look for the title of a table in the database by passing by parameter(request), but when displaying always displays with Ncode problems, I use IE because of the system development itself.

The title shall be completed as follows:: inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

But it is presented this way:

inserir a descrição da imagem aqui

The page is as UTF-8, according to the images:

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

In bank the table is with its collation "Sql_latin1_general_cp1_ci_as" as image:

inserir a descrição da imagem aqui

Would anyone have any hint of what might be causing this yet?

OBS: The problem only occurs when I search in bank.

  • Your collation suggests that the encoding is Latin 1 (you already have a concept error there, you showed the collation in the question, which is not part of the problem - the encoding is what matters. We are just inferring the error based on the collation) - Then you try to display in UTF-8, it is not compatible. Either convert (subject to other confusions), or ideally take this UTF from the page and exchange for charset=iso-8859-1 in the meta tag (if your application doesn’t need to meet non-western languages or record more complex special characters, it’s the simplest way)

1 answer

1

You are using two different encodings on your system, UTF-8 for the application and Latin1 for the database. These encodings are partially compatible with each other, making it possible to display most of the characters in the word Vehicle, with the exception of the accented character, which is in the incompatible part of the two encodings.

I’m not an ASP developer and I don’t usually use SQL Server, so I can’t propose commands for changes to these systems, but if your application only needs to deal with common English characters, I think you could change the encoding of the application to Latin1 (or ISO 8859-1, it’s the same thing). Or, SQL Server has support for what they call Unicode, which would be Encode UTF-16. If you prefer, you can adopt this Meeting in the bank and in the application.

Browser other questions tagged

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