473,396 Members | 1,895 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,396 software developers and data experts.

Problem defining an entity (˙)

Hi,

I'm trying to implement a parser using the XercesC parser under Windaz. I
have a simple structure which is defined using my dtd file. I also require
the use of special sequences of characters so I have tried to define an
entity:

<!ENTITY CONTROL_CODE_CHAR "˙"> <!-- 255 -->

This doesn't work, so I have tried this:

<!ENTITY CONTROL_CODE_CHAR "&#xff;"> <!-- 255 -->

Which doesn't hang the parser, but does *not* give me the yalet character.

I have a line in my xml file:

....
<ITEM>&CONTROL_CODE_CHAR; ERROR!</ITEM>
....

This gives me the text " ERROR!" which is wrong, how do I get this character
to be processed properly?

I'm using this line inside my xml file:

<?xml version="1.0" encoding="windows-1252"?>

FYI, I will also need to build up more control codes using this as a base.

Thanks,
Luke.
Jul 20 '05 #1
6 2110
In article <3fbbaaf7.0@entanet>, Luke Guest <lg****@bubball.com> wrote:
<!ENTITY CONTROL_CODE_CHAR "˙"> <!-- 255 -->
That should work, assuming you're typing it in the encoding you specify.
<!ENTITY CONTROL_CODE_CHAR "&#xff;"> <!-- 255 -->
And so should this, regardless of the encoding.
...
<ITEM>&CONTROL_CODE_CHAR; ERROR!</ITEM>
...

This gives me the text " ERROR!" which is wrong, how do I get this character
to be processed properly?


Are you sure that the *output* is in the encoding you expect? If you
are outputting in, say, UTF-8 you will get different bytes from the
ones you expect.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #2
"Luke Guest" <lg****@bubball.com> wrote:
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
If you want to transmit special, non-ASCII characters, you need to
choose

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

in this simulation of a newsreader.
<!ENTITY CONTROL_CODE_CHAR "?"> <!-- 255 -->
<!ENTITY CONTROL_CODE_CHAR "&#xff;"> <!-- 255 -->
What makes you think that char xFF = 255 is a control character?
the yalet character.
I beg your pardon?
I'm using this line inside my xml file:
<?xml version="1.0" encoding="windows-1252"?>


There is no need to use a Microsoft-proprietary, Windows-specific
encoding here. Use ISO-8859-1 instead. Actually, both agree on
char xFF = 255 being a "y with diaeresis" (˙) but not a control
character.

--
Top posting.
What's the most irritating thing on Usenet?
Jul 20 '05 #3
On Wed, 19 Nov 2003 20:01:29 +0100, Andreas Prilop wrote:
in this simulation of a newsreader.
<!ENTITY CONTROL_CODE_CHAR "?"> <!-- 255 -->
<!ENTITY CONTROL_CODE_CHAR "&#xff;"> <!-- 255 -->


What makes you think that char xFF = 255 is a control character?


It's a control character in my application.
the yalet character.


I beg your pardon?


If you search for that character, the name seems to be "yalet."
I'm using this line inside my xml file:
<?xml version="1.0" encoding="windows-1252"?>


There is no need to use a Microsoft-proprietary, Windows-specific
encoding here. Use ISO-8859-1 instead. Actually, both agree on
char xFF = 255 being a "y with diaeresis" (˙) but not a control
character.


Hmmm.
Jul 20 '05 #4
On Wed, 19 Nov 2003 18:07:12 +0000, Richard Tobin wrote:
In article <3fbbaaf7.0@entanet>, Luke Guest <lg****@bubball.com> wrote:
<!ENTITY CONTROL_CODE_CHAR "˙"> <!-- 255 -->


That should work, assuming you're typing it in the encoding you specify.
<!ENTITY CONTROL_CODE_CHAR "&#xff;"> <!-- 255 -->


And so should this, regardless of the encoding.
...
<ITEM>&CONTROL_CODE_CHAR; ERROR!</ITEM>
...

This gives me the text " ERROR!" which is wrong, how do I get this character
to be processed properly?


Are you sure that the *output* is in the encoding you expect? If you
are outputting in, say, UTF-8 you will get different bytes from the
ones you expect.


Ah, any pointers on how to specify that I want ISO-8859-1?

Thanks,
Luke.

Jul 20 '05 #5
"Luke A. Guest" <la*****@abyss2-nospam.demon.co.uk> wrote:
What makes you think that char xFF = 255 is a control character?
It's a control character in my application.


Then the encoding cannot be either ISO-8859-1 or Windows-1252.
It could be x-user-defined or something like that. But what is the
definition and function of your control character?
If you search for that character, the name seems to be "yalet."


No. <http://www.google.com/search?q=yalet+character>
Jul 20 '05 #6
On Wed, 19 Nov 2003 23:27:57 +0100, Andreas Prilop wrote:
"Luke A. Guest" <la*****@abyss2-nospam.demon.co.uk> wrote:
What makes you think that char xFF = 255 is a control character?


It's a control character in my application.


Then the encoding cannot be either ISO-8859-1 or Windows-1252.
It could be x-user-defined or something like that. But what is the
definition and function of your control character?


The XML file format I have defined is for defining text (in games), it'll
be read in and then dumped out as a big block of binary. The control
characters are used to control things like colour. I don't know why
ISO-8859-1 or windows-1252 cannot be used. All I need is a way to get that
character to be created in my output text after it has been parsed.
If you search for that character, the name seems to be "yalet."


No. <http://www.google.com/search?q=yalet+character>


Yeah, ok...

Luke.

Jul 20 '05 #7

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

Similar topics

6
by: Horst Gutmann | last post by:
Hi :-) I currently have quite a big problem with minidom and special chars (for example &uuml;) in HTML. Let's say I have following input file:...
0
by: Francesc Guim Bernat | last post by:
Dear collegues, I've this XML: <?xml version="1.0"?> <model> <entity id="1"> <object id="1"></object> <object id="2"></object> </entity>
5
by: Clifford W. Racz | last post by:
Has anyone solved the issue of translating lists in Word 2003 (WordML) into xHTML? I have been trying to get the nested table code for my XSLT to work for a while now, with no way to get the...
6
by: Olaf Martens | last post by:
Greetings! Please consider the following piece of program code (note that I have stripped quite a lot of code here): int foo(void) { unsigned short l_valbuf; // address of this goes to...
3
by: dskillingstad | last post by:
I'd appreciate any help I can get. I'm not sure what I'm doing wrong, but.... I've searched these groups for some solutions but no luck. I have an unbound form (frmSearch), with several unbound...
0
by: Gagan Sindhu Dewangan | last post by:
Below is the following procedure where I am facing the problem, the work of the below procedure is to update the database. query result:sp_helptext bProjectUpdate Text ...
0
by: james.mcdonagh | last post by:
Hi I am a newbie using nAnt for .net 2.0. As such I have not come across this bug before, and I would be happy of any help that you may be able to provide. In order to help I have included the...
1
by: jamesmcdonagh | last post by:
Hi newbie using nAnt for .net 2.0. I would be happy of any help that you may be able to provide. The weird thing is that VS.net builds without a problem. And the intellisense within the object...
5
by: Curious | last post by:
Defining your own Entities in a DTD is rather pointless because Firefox & certain other browsers don't read the DTD. Is there a similar mechanism in schemas which works for all browsers?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.