问题标签 [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.
html - Who does the conversion on copy/paste?
Suppose I have an input field in a web page with charset UTF8
; suppose I open a text file encoded with ISO-8859-1
as charset.
Now I copy and paste a string with special characters (like, for example, ô
) from file to the input field : I see that the special characters is correctly displayed into input field.
Who does the conversion from ISO-8859-1
to UTF8
? The browser?
php - 如何从 UTF8 符号转换回 ISO-8859-1?
从数据库中以 UTF8 格式获取数据后,我的文本如下所示(示例):
Str\u00f8msveien
这应该是
斯特罗姆斯韦恩
如何取回我的 ISO-8859-1 符号?
我已经尝试过mb_convert_encoding($jsonstring, "iso-8859-1", "UTF8");
,utf8_decode($jsonstring);
但都没有奏效。
php - 多字符集
场景:我有一个 Web 应用程序,它有一个集成到 Mailman 的自定义注册表单。当用户提交表单时,一个 Ajax 函数调用一个 PHP 脚本,该脚本将数据存储在数据库中。该函数的回调提交给Mailman注册表,它将用户添加到邮件列表中。
问题:当我提交特殊字符时,Mailman 注册表出现问题,例如:ç、é、í、ó 等。所有这些字符都被转换为奇怪的字符。例如,如果我提交“Módulo”,邮递员会收到“Médulo”。
我怎么能解决这个问题?
重要提示:我的网络应用程序的形式使用 UTF8。我认为 Mailman 正在使用:ISO-8859-1。我可以仅在提交表单时转换字段的值吗?
谢谢!
java - 在 SuSE Linux 中进行 ISO-8859-1 编码时,toString 中出现 OutOfMemory 错误
我一直在这个问题上打我的头一段时间。我采用 27K 编码字符串(类似于 URL 编码)并将其转换回 9K“ISO-8859-1”纯文本字符串。
看来我的记忆力很足。相同的代码在 Windows 中的可用内存不到一半的情况下运行良好。我将它作为一个独立的类运行。任何人都知道任何与 JRE 内存泄漏有关的 Linux 编码问题吗?
c# - 读取 iso-8859-1 rss feed C# WP7
我正在尝试阅读使用 iso-8859-1 编码的 rss 提要。
我可以让所有元素都很好,问题是当我将它放在文本块中时,它不会显示所有字符。我不确定我做错了什么。我尝试了一些在谷歌上找到的解决方案,但这对我不起作用。我一定是遗漏了一些东西。这也是我第一次真正使用除 utf-16 之外的任何东西。我以前从来不需要转换任何东西。
该应用程序的工作方式如下我下载字符串异步(WebClient)。所以当它被调用时,我得到一个包含完整 rss 提要的字符串。
我已经尝试获取字节,然后 encoding.convert.. 但我一定遗漏了一些东西。
就像这是一个样本
我也试过这个
虽然标题包含的字符也不能很好地显示。就像..我可以让编码部分工作。而不是这些字符:带问号的正方形、问号或单正方形。
不要误会我的意思,我是这方面的初学者。但是已经在网上发布的解决方案并没有为我解决。
请注意,我删除了编码部分,因为它不起作用:/如果有人能够帮助我,那就太棒了。
php - 亚洲语言的数据库字符集/unicode (UTF-8)
我在 PHP 中设置语言支持时遇到问题。
从我以前的提供商(共享主机)那里可以得到很好的地方
现在我在我的 VPS 上使用 Godaddy。
唯一的问题是,当我从我的 Wordpress 中发布语言时,例如在帖子中发布泰语之类的语言,它可以,但是当我进行一些设置(例如设置标语)时
这将是一个问号??????????
,我去数据库查找并找到相同的东西
所以我查看了排序规则,它在 UFT-8 中正确设置,而我以前的提供者也有相同的设置。
我查看了我的 php.ini,iso-8859-1
然后我将其更改UFT-8
为看看这是否真的有帮助
但仍然给我同样的结果
除了这两个之外,还有什么要配置的,以便获得将在数据库中发布的语言与我想在数据库中发布的语言相同。???
谢谢
xml - 将没有 BOM xml 文件的 UTF-8 转换为 ISO 8859-1
我有一个没有 BOM 的 UTF-8 编码的 xml 文件。在十六进制编辑器中,它给出:3c 3f 78 6d
我缓冲我的 xml 文件并在开头添加 BOM:
然后我尝试使用以下代码行从带有 BOM 的 UTF-8 转换为 ISO 8859-1:
此代码尚未经过测试。你认为这是最好的解决方案吗?欢迎任何想法或建议。先感谢您。
php - 从 ISO-8859-1 到 UTF-8 的 PHP 编码
结果是
HTTP 源代码在元标记中建议使用“iso-8859-1”。德语变音符号很好,但为什么“新”周围的引号没有正确转换?在 PHP手册 中有一个函数 fix_latin。使用此功能时,引号也正确转换!?
PS:欧洲货币符号 € (EUR) 也是如此 - 它也被转换错误(除了 fix_latin 函数),但为什么呢?
c# - What happens to a null byte when converting bytes to ISO 8859-1 encoding?
I'm not entirely sure if the question even makes sense. I'm converting a byte array taken from an ID3 tag and converting it to a string. Most text frames in an ID3 tag use ISO 8859-1 encoding but it depends on the frame. In any case, if you look up what 0x00 is in the ISO 8859-1 codes it is invalid.
To further complicate, either due programmer error or just poor formatting, some of the strings end in 0x00 and some do not.
When converting a series of bytes into a string using ISO 8859-1 encoding do you have manually check the end of the string to see if it is a null? Or will the encoding object through whatever method it uses to convert in the first place deal with the null properly? Furthermore, is there some sort of function that could normalize or "fix" the null terminated string?
When you try to display these strings they do not display properly.
I am using C# for this particular project. Some extra info here about ID3 Tags: ID3 Specs
Or am I completely misunderstanding the whole thing? Is a null terminator simply a way a particular language handles strings and it has nothing to do with encoding?
- Edit: I used System.Text.Encoding.GetEncoding("iso-8859-1") followed by a GetString call