问题标签 [iso-8859-1]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - Silverlight 是否支持 iso-8859-1?
这是一个简单的问题:Silverlight(3.0?)是否支持这种编码?
Encoding c = Encoding.GetEncoding("iso-8859-1");
在 Silverlight 3.0 中调用此函数会产生以下错误。
'ISO-8859-1' is not a supported encoding name.
Parameter name: name
我的想法是解析一些文件客户端,然后只上传我的应用程序所需的那些部分。我知道我可以上传整个文件并在服务器端解析它,但现在最好拥有功能客户端(满足我的需要)。
我会等待答案。我找到了一些信息,但没有人明确表示不支持/不支持。
Microsoft MSDN - GetEncoding 方法参考
谢谢
乔治奥
html - HTML 编码问题 - 显示“”字符而不是“”
我有一个旧版应用程序刚刚开始行为不端,无论出于何种原因,我都不确定。它会生成一堆 HTML,这些 HTML 会被 ActivePDF 转换为 PDF 报告。
这个过程是这样的:
- 从数据库中提取一个 HTML 模板,其中包含要替换的标记(例如“~CompanyName~”、“~CustomerName~”等)
- 用真实数据替换令牌
- 使用一个简单的正则表达式函数整理 HTML,该函数对 HTML 标记属性值进行属性格式化(确保引号等,因为 ActivePDF 的渲染引擎讨厌除属性值周围的单引号之外的任何内容)
- 将 HTML 发送到创建 PDF 的 Web 服务。
在混乱中的某个地方,HTML 模板中的不间断空格(
s)被编码为 ISO-8859-1,因此在浏览器(FireFox)中查看文档时,它们会错误地显示为“”字符。ActivePDF 吐在这些非 UTF8 字符上。
我的问题:由于我不知道问题出在哪里,也没有时间调查它,有没有一种简单的方法来重新编码或查找并替换坏字符?我试过通过我拼凑的这个小功能发送它,但它把它全部变成 gobbledegook并没有改变任何东西。
有任何想法吗?
编辑:
我现在正在接受这个,虽然这似乎不是一个好的解决方案:
vb.net - 将 UTF8 字符串编码为 ISO-8859-1 字符串 (VB.NET)
我需要使用 VB.NET 将 UTF8 字符串转换为 ISO-8859-1 字符串。
有什么例子吗?
强调文本我尝试过拉丁功能而不是运行。我收到不正确的字符串。
我的情况是我需要使用 API 发送短信。
现在我有这个代码:
但没有运行...我收到不正确的消息。例如
如果我写:mañana返回maa ana
如果我写aigüa返回aiga
php - utf-8 转 iso-8859-1 编码问题
我正在尝试从另一个网站上的 rss 提要预览最新帖子。提要采用 UTF-8 编码,而网站采用 ISO-8859-1 编码。显示标题时,我正在使用;
请注意,我期待的连字符不是正常的减号,而是一些大屁股超级破折号。好吧,无论如何要长几个像素。:) 不知道如何描述它,因为我的键盘无法产生那个字符......
php - 将网站字符编码从 iso-8859-1 更改为 UTF-8
大约 2 年前,我犯了使用 iso-8859-1 启动大型网站的错误。我现在遇到了一些字符问题,尤其是在使用 ajax 向服务器发送数据时。因此,我想改用 UTF-8。
您从中看到了什么问题?我知道我必须搜索该站点以查找需要从 ? 更改的字符。到他们的真实性格。但是,这样做还有其他风险吗?有没有人这样做过?
php - 在 PHP 中发送带有特殊字符的电子邮件
我有一个小型 Web 表单,它会导致 PHP 脚本在单击提交按钮时通过 HTML 邮件发送收据。此邮件包含特殊字符,即“å”、“ä”和“ö”。无论我尝试什么,我都无法让这些字符在任何地方正确显示。在某些电子邮件客户端中,这些字符显示得很好,而在其他电子邮件客户端中,它们显示为问号。我尝试以 UTF-8、ISO-8859-1、base-64 编码主题发送邮件,但我真的很难过。
如何使用任何字符从 PHP 发送邮件,同时保证邮件在任何地方都显示相同?
php - Netbeans unicode 问题
我正在切换到 Netbeans 进行 php 编程(我目前使用 gedit)。
原始源代码中的某些字符(à、á、é、è 等)在 Netbeans 中未显示,无论使用何种字体,而是显示了一个小引号。这些文件在 gedit 和 firefox 中都能完美显示。
如果我在 Netbeans 中修改文件,字符在 gedit 和 firefox 中显示不正确。如果我添加“有问题的”字符之一,这些新字符会在 netbeans 和 gedit 中完美显示,但不会在 firefox 中显示(即使未修改 html 标头)。
我尝试添加:
-J-Dfile.encoding=UTF-8
并-J-Dfile.encoding=ISO-8859-1
_ netbeans_default_options
在 /etc/netbeans.conf 上没有结果。
有什么建议么?
php - Switch website encoding from ISO-8859-1 to UTF-8
I am trying to convert my existing PHP webpage to use UTF-8 encoding.
To do so, I have done the following things:
- specified UTF-8 as the charset in the meta content tag at the start of my webpage.
- change the default_charset to UTF-8 in the php.ini.
- specified UTF-8 as the iconv encoding in the php.ini file.
- specified UTF-8 in my .htaccess file using: AddDefaultCharset UTF-8.
Yet after all that, when i echo mb_internal_encoding(), it shows as ISO-8859-1. What am I missing here? I know I could use auto_prepend to attach a script that changes the default encoding to UTF-8, but I'm just trying to understand what I'm missing.
Thanks
java - MD5 Hash of ISO-8859-1 string in Java
I'm implementing an interface for digital payment service called Suomen Verkkomaksut. The information about the payment is sent to them via HTML form. To ensure that no one messes with the information during the transfer a MD5 hash is calculated at both ends with a special key that is not sent to them.
My problem is that for some reason they seem to decide that the incoming data is encoded with ISO-8859-1 and not UTF-8. The hash that I sent to them is calculated with UTF-8 strings so it differs from the hash that they calculate.
I tried this with following code:
Unfortunately both hashes are identical with value C83CF67455AF10913D54252737F30E21. The correct value for this example case is 975816A41B9EB79B18B3B4526569640E according to Suomen Verkkomaksut's documentation.
Is there a way to calculate MD5 hash in Java with ISO-8859-1 strings?
UPDATE: While waiting answer from Suomen Verkkomaksut, I found an alternative way to make the hash. Michael Borgwardt corrected my understanding of String and encodings and I looked for a way to make the hash from byte[].
Apache Commons is an excellent source of libraries and I found their DigestUtils class which has a md5hex function which takes byte[] input and returns a 32 character hex string.
For some reason this still doesn't work. Both of these return the same value:
c# - C# 将字符串从 UTF-8 转换为 ISO-8859-1 (Latin1) H
我已经用谷歌搜索了这个主题,并且查看了每个答案,但我仍然不明白。
基本上我需要将 UTF-8 字符串转换为 ISO-8859-1,并使用以下代码进行操作:
我的源字符串是
但不幸的是我的结果字符串变成了
我在这里做错了什么?