473,394 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

about charset again

hi, i put as you said encoding="UTF-8" (<?xml version="1.0" encoding="UTF-8"
standalone="no"?> as first line), but when i tried to validate in
http://validator.w3.org, i get the following response:
The HTTP Content-Type header sent by your web browser (unknown) did not
contain a "charset" parameter, but the Content-Type was one of the XML
text/* sub-types (text/xml). The relevant specification (RFC 3023) specifies
a strong default of "us-ascii" for such documents so we will use this value
regardless of any encoding you may have indicated elsewhere. If you would
like to use a different encoding, you should arrange to have your browser
send this new encoding information.

Sorry, I am unable to validate this document because on lines 47, 51, 54,
102, 112, 148, 157, 231 it contained one or more bytes that I cannot
interpret as us-ascii (in other words, the bytes found are not valid values
in the specified Character Encoding). Please check both the content of the
file and the character encoding indication.
in that lines were the caracters ñ (&ntilde;) é (&ecute;) and many others

do you know how to solve this problem???
Thanks
Jul 20 '05 #1
3 1993
On Tue, 5 Oct 2004, Ricardo Garcia wrote:
hi, i put as you said encoding="UTF-8" (<?xml version="1.0" encoding="UTF-8"
standalone="no"?> as first line), but when i tried to validate in
http://validator.w3.org, i get the following response:
You don't say which mode of submission you are using, but
from the wording of the response I presume you are validating by
file upload?
The HTTP Content-Type header sent by your web browser (unknown) did not
contain a "charset" parameter, but the Content-Type was one of the XML
text/* sub-types (text/xml). The relevant specification (RFC 3023) specifies
a strong default of "us-ascii" for such documents so we will use this value
regardless of any encoding you may have indicated elsewhere. If you would
like to use a different encoding, you should arrange to have your browser
send this new encoding information.
That sounds pretty self-explanatory to me, but you need to understand
a little more about how your browser works to get this sorted out.
in that lines were the caracters ñ (&ntilde;) é (&ecute;) and many
others
If your document is in utf-8 as your <?xml thingy says it is, then
those characters will be represented in utf-8 encoding and thus
will consist of (in this case) two bytes each, with their top bits
set. These cannot be us-ascii characters, therefore, and the
validator is rejecting them with the above explanation.

Please understand that the encoded characters (ñ and é) represent a
problem in the above terms; whereas their representation in
&-notation would consist entirely of us-ascii characters and thus
would not be a problem from this point of view (your &ntilde; and
&eacute; would be a problem in XML for a different reason, namely that
you would need to define them). So it's important to be precise in
describing what you are doing.
do you know how to solve this problem???


I would guess one or other of:

1. find out how to have your browser send a charset= attribute on file
upload

2. find out how to have your browser upload with an application/...
content type, where utf-8 is assumed default (if I'm not mistaken)

3. Use the "extended file upload" interface, and specify the encoding
in the submission dialog

4. put your content on a web server and validate it by URL; adjust
the web server until it sends the right Content-type header.

Details depend on what specific software you are using. I guess the
option number 3 above is the easiest to use.

good luck
Jul 20 '05 #2
Looks to me like you have iso-8859-1 characters in your document, if
you just cut-and-paste to get e.g. ñ in your message. Set your
encoding to iso-8859-1 and see if that helps.

ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Jul 20 '05 #3
On Tue, 5 Oct 2004, Ricardo Garcia wrote:
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437

in that lines were the caracters ? (&ntilde;) ? (&ecute;) and many others

do you know how to solve this problem???


You can't even transmit special, non-ASCII characters in your
would-be newsreader. So, what do you expect?

Hint:

Tools > Options > Send
Mail Sending Format > Plain Text Settings > Message format MIME
News Sending Format > Plain Text Settings > Message format MIME
Encode text using: None

--
Top-posting.
What's the most irritating thing on Usenet?

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wouter | last post by:
Hi, I use Windows XP, Apache2 and MySQL 4.1. I changed my default charset by adding in my php.ini: default-character-set=utf8 Some row inserts now went wrong, so I did remove it again....
35
by: The Bicycling Guitarist | last post by:
My web site has not been spidered by Googlebot since April 2003. The site in question is at www.TheBicyclingGuitarist.net/ I received much help from this NG and the stylesheets NG when updating the...
17
by: ccdrbrg | last post by:
This is a rather general subject, I apologize. I am new to XHTML, CSS, et al and I am having trouble understanding the DTD and xml namespace declarations. For example: <!DOCTYPE html PUBLIC...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
7
by: gmclee | last post by:
Hi there, I am writing a program to load HTML from file and send it to IE directly. I've met some problem in charset setting. Most of HTML have charset "us-ascii", for some reason, some UNICODE...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.