UTF8 with Linq in CSLA

UTF8 with Linq in CSLA

Old forum URL: forums.lhotka.net/forums/t/10392.aspx

linhvu posted on Sunday, May 22, 2011


I have website. The website is wrote by ASP.NET with CSLA. I have a problem. Please, help me.

I try to encode UTF-8 with ASP.NET but I can't. My database do not store  formal data.

Example: Thá»­ >> Thu?.

I used to tag Meta (<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>) and

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="DangKiDeTai.aspx.cs" Inherits="Sinhvien_DangKiDeTai" ContentType="text/html" ResponseEncoding="UTF-8" ValidateRequest="false"%>. 




RockfordLhotka replied on Sunday, May 22, 2011

As you probably know, you need to use compatible data types all the way from the UI through to the database. That probably means using Unicode data types in your app and database.

The most likely problem is that your database column may be defined using a text type that doesn't support Unicode?

linhvu replied on Sunday, May 22, 2011

I using text type nvarchar. I think problem in webform or Linq don't support unicode UTF-8.

Copyright (c) Marimer LLC