本文介绍了如何使用Notepad ++将ANSI编码的文件转换为UTF-8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,可以在Firefox中使用jQuery发送土耳其语字符,但是Internet Explorer不会发送土耳其语字符.我在记事本中查看了我的源文件,该文件的代码页是ANSI.

I have a website, and I can send my Turkish characters with jQuery in Firefox, but Internet Explorer doesn't send my Turkish characters.I looked at my source file in notepad, and this file's code page is ANSI.

当我将其转换为不带BOM的UTF-8并关闭文件时,重新打开文件后,文件再次为ANSI.

When I convert it to UTF-8 without BOM and close the file, the file is again ANSI when I reopen.

如何将文件从ANSI转换为UTF-8?

How can I convert my file from ANSI to UTF-8?

推荐答案

关于此部分:

最简单的解决方案是通过正确配置Notepad ++完全避免该问题.

The easiest solution is to avoid the problem entirely by properly configuring Notepad++.

尝试Settings-> Preferences-> New document-> Encoding->选择不带BOM的UTF-8,然后选中Apply to opened ANSI files.

Try Settings -> Preferences -> New document -> Encoding -> choose UTF-8 without BOM, and check Apply to opened ANSI files.

这样,所有打开的ANSI文件将被视为不带BOM的UTF-8.

That way all the opened ANSI files will be treated as UTF-8 without BOM.

有关发生的情况的解释,请阅读此答案下方的注释.

For explanation what's going on, read the comments below this answer.

要完全了解Unicode和UTF-8,请阅读这篇出色的文章,来自Joel Spolsky.

To fully learn about Unicode and UTF-8, read this excellent article from Joel Spolsky.

这篇关于如何使用Notepad ++将ANSI编码的文件转换为UTF-8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 18:17