Redian新闻
>
fiber-optic communication systems 3rd edtion 解答
avatar
fiber-optic communication systems 3rd edtion 解答# Engineering - 工程
k*r
1
I saved a JSP file with an external text editor (Notepad++)
as UTF-8 with BOM. Eclipse reads it fine after I set in
project properties, resource, source file encoding as UTF-8.
However, when I try to save, I get an error:
"Save could not be completed.
Reason:
Some characters cannot be mapped using "ISO-8859-1" charater
encoding ..."
Any idea how I can save JSP in UTF-8?
avatar
o*g
2
求 fiber-optic communication systems 3rd edtion 解答
感谢万分
avatar
g*g
3
right click file, choose encoding as UTF-8

【在 k***r 的大作中提到】
: I saved a JSP file with an external text editor (Notepad++)
: as UTF-8 with BOM. Eclipse reads it fine after I set in
: project properties, resource, source file encoding as UTF-8.
: However, when I try to save, I get an error:
: "Save could not be completed.
: Reason:
: Some characters cannot be mapped using "ISO-8859-1" charater
: encoding ..."
: Any idea how I can save JSP in UTF-8?

avatar
k*r
4
什么版本啊?我的是3.5.2,right click in editor shows no
such menu ...

【在 g*****g 的大作中提到】
: right click file, choose encoding as UTF-8
avatar
g*g
5
choose properties->resource.

【在 k***r 的大作中提到】
: 什么版本啊?我的是3.5.2,right click in editor shows no
: such menu ...

avatar
k*r
6
Project properties? 这个试过了,设成UTF-8之后可以读UTF-8文件,
不能保存。。。

【在 g*****g 的大作中提到】
: choose properties->resource.
avatar
g*g
7
Properties for individual file

【在 k***r 的大作中提到】
: Project properties? 这个试过了,设成UTF-8之后可以读UTF-8文件,
: 不能保存。。。

avatar
k*r
8
Properties里面没有encoding。。。
菜单Set Encoding里面default是determined from content,
已经是UTF-8了,但是不管用。手工选择 UTF-8就可以了。
谢谢!

【在 g*****g 的大作中提到】
: Properties for individual file
avatar
m*t
9
If you are on windows, I would recommend always set the encoding to utf-8 at
the workspace level.

【在 k***r 的大作中提到】
: Properties里面没有encoding。。。
: 菜单Set Encoding里面default是determined from content,
: 已经是UTF-8了,但是不管用。手工选择 UTF-8就可以了。
: 谢谢!

avatar
b*y
10
I use notepad++, great product.
Except the guy hates China I guess, but what da heck, I just use it as it is
free anyway.
UTF-8 is easy, I either use UTF-8 with BOM or not.
avatar
k*r
11
Good idea! Thanks

8 at

【在 m******t 的大作中提到】
: If you are on windows, I would recommend always set the encoding to utf-8 at
: the workspace level.

avatar
k*r
12
I find that if jsp is UTF-8 w/o BOM, the page is not
rendered property. Not sure if tomcat determines page
encoding from BOM and sends a wrong header. So I have
to always use UTF-8 with BOM.

it is

【在 b******y 的大作中提到】
: I use notepad++, great product.
: Except the guy hates China I guess, but what da heck, I just use it as it is
: free anyway.
: UTF-8 is easy, I either use UTF-8 with BOM or not.

avatar
g*g
13
I don't get why you need UTF-8 with JSP though, those
resource entries are better saved in resource files.

【在 k***r 的大作中提到】
: I find that if jsp is UTF-8 w/o BOM, the page is not
: rendered property. Not sure if tomcat determines page
: encoding from BOM and sends a wrong header. So I have
: to always use UTF-8 with BOM.
:
: it is

avatar
k*r
14
I'm taking a shortcut and hard-coding some text
strings in the JSP files :-)
I think JSPs are HTML files with Java. It's a little
extreme to exclude any text strings in JSP for single
language pages. Even for multiple language pages, I'm
not sure if it's always practical to use templates in
JSPs to form sensible text.

【在 g*****g 的大作中提到】
: I don't get why you need UTF-8 with JSP though, those
: resource entries are better saved in resource files.

avatar
m*t
15

Hey, I think I like my Chinese CSS style names just fine! ;-)

【在 g*****g 的大作中提到】
: I don't get why you need UTF-8 with JSP though, those
: resource entries are better saved in resource files.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。