An invalid XML character (Unicode: 0x1a)


 
Thread Tools Search this Thread
Operating Systems Solaris An invalid XML character (Unicode: 0x1a)
# 8  
Old 05-14-2011
Set your locale to hi_IN.UTF-8 and test your XML document again. You are using the Xerces processsor - which is extremely robust.

There are many Unicode characters that are not allowed in an XML document, according to the XML specification. See sections 2.2 and 4.1 of the 1.0 specification. Typical disallowed characters are control characters (such as 0x1a) , even if you escape them using the Character Reference form, i.e. &#xxxx; I would examine your XML document to see if there is a spurious 0x1a there. (use od -hc, xxd, 1.0 etc.)
This User Gave Thanks to fpmurphy For This Post:
# 9  
Old 05-14-2011
The our of command cat /etc/default/init | grep -v "^#"

HTML Code:
-> cat /etc/default/init | grep -v "^#"
TZ=Asia/Calcutta
CMASK=022
Yes i didn't replace all occurance, relaced first two lines, thing to check if error move from that line, but it didn't.., it stuck at the first line where i had made changes
# 10  
Old 05-14-2011
That doesn't make sense. The error message you posted "An invalid XML character (Unicode: 0x1a) was found in the value of attribute" implies the line hasn't been modified.
# 11  
Old 05-14-2011
I did replaced all the occurrences

<TcUnitOfMeasure unitOfMeasureName="Microampere" unitOfMeasureSymbol="&#x03BC;A"/>
<TcUnitOfMeasure unitOfMeasureName="Microfarad" unitOfMeasureSymbol="&#x03BC;F"/>
TcUnitOfMeasure unitOfMeasureName="Microgram/liter" unitOfMeasureSymbol="&#x03BC;GL"/>
<TcUnitOfMeasure unitOfMeasureName="Microgram/cubic meter" unitOfMeasureSymbol="&#x03BC;GQ"/>
<TcUnitOfMeasure unitOfMeasureName="micro Hertz" unitOfMeasureSymbol="&#x03BC;HZ"/>
<TcUnitOfMeasure unitOfMeasureName="Microliter" unitOfMeasureSymbol="&#x03BC;L"/>
TcUnitOfMeasure unitOfMeasureName="Micrometer" unitOfMeasureSymbol="&#x03BC;M"/>

but some how my server is not picking the characters and still throwing exception at same point/line

---------- Post updated at 08:51 PM ---------- Previous update was at 08:37 PM ----------

Mean time i am trying to install UTF-8 locale, as per my search in need to execute localeadm command
HTML Code:
-> localeadm -l -v
Verbose mode
You do not appear to have created a fresh config file since you began using this                               application.
If you have a set of Solaris install images available to you, it is recommended                               that you do so before proceeding.


Do you wish to create a new config file? [y/n]: y

Please select the option that was used to install Solaris

1.  CD installation/net installed CD images
2.  DVD installation/net installed combined image

Please enter your choice:
This mean i need to request my admin team get the install CD's and install?, is there any way i can download a package file and install these
# 12  
Old 05-15-2011
What says:
Code:
grep 'TcUnitOfMeasure unitOfMeasureName="Microampere"' model_dbextract.xml | od -c

?

---------- Post updated at 07:59 ---------- Previous update was at 07:52 ----------

Quote:
Originally Posted by karghum
Mean time i am trying to install UTF-8 locale, as per my search in need to execute localeadm command
You don't if one of hindi, japanese, korean, thai or chinese is okay for you.
You can simply set this variable in your profile and log in again:
Code:
LC_ALL=hi_IN.UTF-8
export LC_ALL

This User Gave Thanks to jlliagre For This Post:
# 13  
Old 05-16-2011
Issue Solved, Thanks for all the help

Hello experts
HTML Code:
jlliagre & fpmurphy
, today i tired temporarily setting the locale to
HTML Code:
LC_ALL=hi_IN.UTF-8 export LC_ALL
The upgrade went fine, and now i reverted back to old locale by removing etry in .profile, mean while requested my IS team to load the locales on my servers

Thank you very much much for all effort you guys spent in helping to fix this issue and mean while i learnt quite a bit about locale feature in Solaris
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find invalid character

HI Team, I have script to find the invalid character in file. f=’pallvi\mahajan’ n=0 while (( $n <= ${#f} )); do c="${f:$n:1}" echo '$c' if *] ]]; then grep -sq $c valid.txt if ; then echo "$f" >> f.txt break fi fi (18 Replies)
Discussion started by: pallvi_mahajan
18 Replies

2. Shell Programming and Scripting

Searching invalid character in list of client name

Hi Friend, I have a client name list and client name has some invalid character due to which some issue raised and list of client are15k. I want to make script who find invalid character name. can you please help me how i can make script, i means i need logic. Valid character are :- ... (5 Replies)
Discussion started by: pallvi_mahajan
5 Replies

3. Shell Programming and Scripting

Greping entire XML which has special character

I have an XML with has special character Â. I wrote a Grep command to find out the special character grep -i  Filename | grep ShipAddress2 I need the help to know how to find out special character such as  and get the whole XML listed assuming there are more xml data of similar sort for... (3 Replies)
Discussion started by: murali1687
3 Replies

4. AIX

Bison -pap_expr_yy invalid character:% unexpected "identifier" while running make for Apache2.4.3 64

The Follwing packages are installed on my AIX 6.1 box gcc-4.7.2-1 gcc-c++-4.7.2-1 gcc-cpp-4.7.2-1 gcc-gfortran-4.7.2-1 libgcc-4.7.2-1 libgomp-4.7.2-1 libstdc++-4.7.2-1 libstdc++-devel-4.7.2-1 gmp-5.0.5-1 libmpc-1.0.1-2 libmpc-devel-1.0.1-2 libmpcdec-1.2.6-1 libmpcdec-devel-1.2.6-1... (0 Replies)
Discussion started by: Ashish Gupta
0 Replies

5. Shell Programming and Scripting

Unicode help

is there any way to handle unicode such as ʃʰɐm̆ (1 Reply)
Discussion started by: sreejithalokkan
1 Replies

6. UNIX for Dummies Questions & Answers

Remove Unicode/special chars from XML

Hi, We are receiving an XML file in Unix which has some special characters between tags like '^' etc <Tag> 1e^O7f%<2304e.$d8f57e8^Bf-&e.^Zh7/327e^O7 </Tag> We need to remove all special characters like ^ ones and also any '&' or '<' or '>' being sent within the start and close tags i.e.... (6 Replies)
Discussion started by: dsrookie7
6 Replies

7. Shell Programming and Scripting

How do I replace a unicode character using sed

I have a unicode character {Unicode: 0x1C} in my file and I need to replace it with a blank. How would a sed command look like? cat file1 | sed "s/&#x28;//g;" > file2 Is X28 the right value for this Unicode character?? (4 Replies)
Discussion started by: Hangman2
4 Replies

8. Linux

Invalid Character

Hi, I am using a Perl script to generate a report file in Linux server. When my input data contains an invalid character which looks like hyphen after that my program is printing junk values in the report. Why that symbol is causing issue and is there a way to tell the server that this is a valid... (1 Reply)
Discussion started by: lawrance_ps
1 Replies

9. Shell Programming and Scripting

Find Unicode Character in File

I have a very large file in Unix that I would like to search for all instances of the unicode character 0x17. I need to remove these characters because the character is causing my SAX Parser to throw an exception. Does anyone know how to find a unicode character in a file? Thank you for your... (1 Reply)
Discussion started by: azelinsk
1 Replies

10. Programming

How to display unicode characters / unicode string

I have a stream of characters like "\u8BBE\u5907\u7BA1" and i want to display it. I tried following things already without any luck. 1) printf("%s",L("\u8BBE\u5907\u7BA1")); 2) printf("%lc",0x8BBE); 3) setlocale followed by fwide followed by wprintf 4) also changed the local manually... (3 Replies)
Discussion started by: jackdorso
3 Replies
Login or Register to Ask a Question