法国重音字符 [英] accented French characters

查看:143
本文介绍了法国重音字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否与任何ASPX问题使法国的重音字符?

我使用UTF-8 EN code。

我从来没有过这样的任何问题,(但由于这是第一次,我在ASP服务器上的工作有没有解决?)

例如
EVENEMENTS = A‰VA©nements
Journéesfériées=JournéES FA©RIA©ES

这是一个编码的问题?或者是有任何具体的code我需要把正确渲染。

下面是一个例如

页面上写着:

倒recevoir莱通信德拉€™Ã©油菜杆courriel,veuillez理性indiquer VOTRE住址courriel 

它应该阅读:

倒recevoir莱通信DE L'高等齐名courriel,veuillez理性indiquer VOTRE住址courriel 


解决方案

有什么问题,是什么呢?你有你的文件的顶部设置在页面指令@ codePAGE = 65001?你有没有标示内容类型与正确的编码,使客户端知道它的意思吗?

如果您看到问号,这可能是你没有正确设置响应code页面。如果您在使用的地方一变音符号单个字符的看到两个不相关的字符,你还没有告诉它需要知道治疗的页面为UTF-8,例如客户端

 响应codePAGE = 65001。
Response.Charset的=UTF-8;

有asp.net和编码的ASP处理略有不同,所以这也将是有益的,如果你是更具体的了解您所使用的技术,但应该让你最那里的方式。

在ASP.Net,你可以在你的web.config文件每一页上设置编码站点范围,这样可以避免搞乱的响应。codePAGE和请求。codePAGE。你仍然想使用META HTTP-当量内容类型元素在你的HTML或使用Response.Charset的标记响应字符集。

 <全球化
            requestEncoding =utf-8
            的ResponseEncoding =UTF-8/>

如果你不想使用的web.config这出于某种原因,你会使用<%@ codePAGE = 65001%在你输出的任何文字,页面之前,请.aspx文件>指令。

看起来有问题的页面包含不正确的连接codeD UTF-8。是内容从.aspx文件直即将或正从数据库或什么拉?

Is there any problem with ASPX to render french accented characters?

I am using utf-8 to encode.

I never had any problem like this before (but since this is the first time I am working on an ASP server is there any fix?)

e.g Événements = Événements Journées fériées = Journées fériées

Is this an encoding problem? or is there any specific code I need to place to render it correctly.

here is an example

The page reads:

Pour recevoir les communications de l’école par courriel, veuillez nous indiquer votre adresse courriel

It should read:

Pour recevoir les communications de l'école par courriel, veuillez nous indiquer votre adresse courriel

解决方案

What's the problem, exactly? Have you set @Codepage=65001 in the page directives at the top of your file? Have you marked the content-type with the correct encoding so that the client knows what its getting?

If you see question marks, it's probable that you haven't set the response code page correctly. If you see two unrelated characters in place of a single character with a diacritic , you haven't told the client what it needs to know to treat the page as UTF-8, e.g.

Response.CodePage = 65001 ;
Response.CharSet = "utf-8" ;

There are slight differences between asp.net and asp handling of encoding, so it would also be helpful if you were more specific about which technology you're using, but that should get you most of the way there.

In ASP.Net, you can set the encoding site-wide in your web.config file, so you can avoid messing with Response.CodePage and Request.CodePage on every page. You still want to mark the Response Charset using the meta http-equiv content-type element in your HTML or using Response.Charset.

<globalization 
            requestEncoding="utf-8" 
            responseEncoding="utf-8"  />

If you don't want to use web.config for this for some reason, you'd use <%@CodePage=65001 %> in your .aspx file before you output any text, in the page directives.

It looks like the page in question contains incorrectly encoded UTF-8. Is the content coming straight from the .aspx file or is it being pulled from a database or something?

这篇关于法国重音字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆