Leo
Leo

Reputation: 19

Varchar column from SQL Server shows as "???" on classic ASP webpage hosted on Azure

I'm trying to move some old classic ASP website to Azure App Service. The webpages work fine, but show national characters from varchar columns as question marks.

How to reproduce:

So, the nvarchar columns show up fine, but varchar columns do not. Using the following code on the Azure web page doesn't help:

Response.CharSet = "windows-1251"
Response.CodePage = 1251
Session.CodePage = 1251 

On "regular" IIS everything is shown fine - maybe because it has "ASP encoding" setting. Anybody knows how to fix that on Azure?

Thanks in advance

Upvotes: 1

Views: 594

Answers (1)

Jambor - MSFT
Jambor - MSFT

Reputation: 3293

The best solution is to change varchar to nvarchar as marc_s said. If it is not a good solution for you, please try to set Collation as "Cyrillic_General_CI_AS" when creating your Azure SQL Database. Refer to this article for more detailed information.

enter image description here

Here is my result: (just create a mvc controller with view using Entity framework)

enter image description here

Upvotes: 1

Related Questions