Unix/Linux Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

An invalid XML character (Unicode: 0x1a)

Solaris


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 05-13-2011
karghum karghum is offline
Registered User
 
Join Date: May 2011
Last Activity: 5 August 2013, 12:13 AM EDT
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
An invalid XML character (Unicode: 0x1a)

While uploading an exl file to my application in Solaris 10 the upload failed with error
HTML Code:
Error! Parsing Error: /SPLM/TC83/tcdata83/model/model_dbextract.xml  Line:65576 Column:73 An invalid XML character (Unicode: 0x1a) was found  in the value of attribute "unitOfMeasureSymbol" and element is  "TcUnitOfMeasure".
Please check the errors.
Aborting...
Exception Encountered!!!
java.lang.NullPointerException
what i found is xml file when i open in windows the failed line shows something like this
HTML Code:
<TcUnitOfMeasure unitOfMeasureName="Microampere" unitOfMeasureSymbol="µA"/>
        <TcUnitOfMeasure unitOfMeasureName="Microfarad" unitOfMeasureSymbol="µF"/>
same line after transfering to unix using ascii option in ftp looks like
HTML Code:
 <TcUnitOfMeasure unitOfMeasureName="Microampere" unitOfMeasureSymbol="\265A"/>
                <TcUnitOfMeasure unitOfMeasureName="Microfarad" unitOfMeasureSymbol="\265F"/>
if i use ftp transfer option as binary looks like
HTML Code:
<TcUnitOfMeasure unitOfMeasureName="Microampere" unitOfMeasureSymbol="^ZA"/>
                <TcUnitOfMeasure unitOfMeasureName="Microfarad" unitOfMeasureSymbol="^ZF"/>
hence the symbol for micofard mu is not parsing in unix, can experts help me how i can solve this issue

Thank you
Raghu
Sponsored Links
    #2  
Old Unix and Linux 05-13-2011
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 19 October 2017, 4:07 PM EDT
Location: Outside Paris
Posts: 4,870
Thanks: 18
Thanked 635 Times in 554 Posts
Your file seems to be encoded in ISO-8859-1 by windows while UTF-8 is likely expected.

Is an encoding specified in its header ?
Something like:

Code:
<?xml version="1.0" encoding="utf-8" ?>

?

In any case, this should work:

Code:
 unitOfMeasureSymbol="&#x03BC;A"

Sponsored Links
    #3  
Old Unix and Linux 05-14-2011
karghum karghum is offline
Registered User
 
Join Date: May 2011
Last Activity: 5 August 2013, 12:13 AM EDT
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
Header is
HTML Code:
?xml version="1.0" encoding="UTF-8" standalone="no"?>
i checked for my locale settings in server
HTML Code:
-> locale
LANG=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=
HTML Code:
and locale - lists this output
C
POSIX
hi_IN.UTF-8
iso_8859_1
ja
ja_JP.PCK
ja_JP.UTF-8
ja_JP.eucJP
ko
ko.UTF-8
ko_KR.EUC
ko_KR.EUC@dict
ko_KR.UTF-8
ko_KR.UTF-8@dict
th
th_TH
th_TH.ISO8859-11
th_TH.TIS620
th_TH.UTF-8
zh
zh.GBK
zh.UTF-8
zh_CN.EUC
zh_CN.EUC@pinyin
zh_CN.EUC@radical
zh_CN.EUC@stroke
zh_CN.GB18030
zh_CN.GB18030@pinyin
zh_CN.GB18030@radical
zh_CN.GB18030@stroke
zh_CN.GBK
zh_CN.GBK@pinyin
zh_CN.GBK@radical
zh_CN.GBK@stroke
zh_CN.UTF-8
zh_CN.UTF-8@pinyin
zh_CN.UTF-8@radical
zh_CN.UTF-8@stroke
zh_HK.BIG5HK
zh_HK.BIG5HK@radical
zh_HK.BIG5HK@stroke
zh_HK.UTF-8
zh_TW
zh_TW.BIG5
zh_TW.BIG5@pinyin
zh_TW.BIG5@radical
zh_TW.BIG5@stroke
zh_TW.BIG5@zhuyin
zh_TW.EUC
zh_TW.EUC@pinyin
zh_TW.EUC@radical
zh_TW.EUC@stroke
zh_TW.EUC@zhuyin
zh_TW.UTF-8

so that means i don't have corret UTF-8 locale?

i used "tcunitOfMeasureSymbol="&#x03BC;A" still no sucess
    #4  
Old Unix and Linux 05-14-2011
fpmurphy's Unix or Linux Image
fpmurphy fpmurphy is offline
Registered User
 
Join Date: Dec 2003
Last Activity: 12 June 2016, 11:03 PM EDT
Location: /dev/ph
Posts: 4,996
Thanks: 73
Thanked 475 Times in 437 Posts
You may have something else going on. What parser are you using? Can your parser handle the following short XML document?

Code:
<?xml version="1.0" encoding="utf-8" ?>
<Собирание версия="2.5-7">
 <Объект id="14">
  <НомерОбъекта>45-3454-123</НомерОбъекта>
  <ВНаличии>1512</ВНаличии>
  <Описание xml:lang="ja">第二発電機</Описание>
 </Объект>
 <Объект id="64">
  <НомерОбъекта>45-7894-456</НомерОбъекта>
  <ВНаличии>1435</ВНаличии>
  <Описание xml:lang="ja">手動ウォーター・ポンプ</Описание>
 </Объект>
</Собирание>

Sponsored Links
    #5  
Old Unix and Linux 05-14-2011
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 19 October 2017, 4:07 PM EDT
Location: Outside Paris
Posts: 4,870
Thanks: 18
Thanked 635 Times in 554 Posts
Quote:
Originally Posted by karghum View Post
Header is
HTML Code:
?xml version="1.0" encoding="UTF-8" standalone="no"?>
Okay. Then that is the problem. Your µ is not in UTF-8 in this file.
Quote:
so that means i don't have corret UTF-8 locale?
It seems you are using 7 bit ASCII locale. What says
Code:
set|grep LC

?
Quote:
i used "tcunitOfMeasureSymbol="&#x03BC;A" still no sucess
This is odd. What error message do you get ?
Sponsored Links
    #6  
Old Unix and Linux 05-14-2011
karghum karghum is offline
Registered User
 
Join Date: May 2011
Last Activity: 5 August 2013, 12:13 AM EDT
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
Here is what it return

-> set|grep LC
MAILCHECK=600

about the error, it's same error and at the same line it start "microfarad"

HTML Code:
Localization Extraction Completed.
Please refer [/SPLM/TC83/server_root/logs/business_model_extractor_2011_05_14_08-09-49.log] for log information
An invalid XML character (Unicode: 0x1a) was found in the value of attribute "unitOfMeasureSymbol" and element is "TcUnitOfMeasure".
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x1a) was found in the value of attribute "unitOfMeasureSymbol" and element is "TcUnitOfMeasure".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at com.teamcenter.bmide.base.core.loader.XMLContentParser.parseWithValiation(Unknown Source)
at com.teamcenter.bmide.base.core.loader.XMLContentParser.parse(Unknown Source)
at com.teamcenter.bmide.base.core.loader.XMLContentParser.parse(Unknown Source)
at com.teamcenter.bmide.foundation.core.loader.BusinessDataContentParser.parse(Unknown Source)
at com.teamcenter.bmide.foundation.core.util.ServerCoreUtil.buildModels(Unknown Source)
at com.teamcenter.bmide.foundation.core.util.ServerCoreUtil.buildModels(Unknown Source)
at com.teamcenter.bmide.tcplmxml.xsdgen.impl.TcPlmXmlXsdInstallToTC.install(Unknown Source)
at com.teamcenter.bmide.tcplmxml.xsdgen.impl.TcPlmXmlXsdInstallToTCMain.main(Unknown Source)
Aborting...
HTML Code:
fpmurphy
My server coludn't hadle the test xml file you gave, transfered it in ascii/binary format in ftp and checked

HTML Code:
-> cat test.xml
<?xml version="1.0" encoding="utf-8" ?>
<????????? ??????="2.5-7">
 <?????? id="14">
  <????????????>45-3454-123</????????????>
  <????????>1512</????????>
  <???????? xml:lang="ja">?????</????????>
 </??????>
 <?????? id="64">
  <????????????>45-7894-456</????????????>
  <????????>1435</????????>
  <???????? xml:lang="ja">???????·???</????????>
 </??????>
</?????????>infodba-ie10ux013:/home/infodba
---------- Post updated at 04:13 AM ---------- Previous update was at 04:12 AM ----------

Here is what it return

-> set|grep LC
MAILCHECK=600

about the error, it's same error and at the same line it start "microfarad"

HTML Code:
Localization Extraction Completed.
Please refer [/SPLM/TC83/server_root/logs/business_model_extractor_2011_05_14_08-09-49.log] for log information
An invalid XML character (Unicode: 0x1a) was found in the value of attribute "unitOfMeasureSymbol" and element is "TcUnitOfMeasure".
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x1a) was found in the value of attribute "unitOfMeasureSymbol" and element is "TcUnitOfMeasure".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at com.teamcenter.bmide.base.core.loader.XMLContentParser.parseWithValiation(Unknown Source)
at com.teamcenter.bmide.base.core.loader.XMLContentParser.parse(Unknown Source)
at com.teamcenter.bmide.base.core.loader.XMLContentParser.parse(Unknown Source)
at com.teamcenter.bmide.foundation.core.loader.BusinessDataContentParser.parse(Unknown Source)
at com.teamcenter.bmide.foundation.core.util.ServerCoreUtil.buildModels(Unknown Source)
at com.teamcenter.bmide.foundation.core.util.ServerCoreUtil.buildModels(Unknown Source)
at com.teamcenter.bmide.tcplmxml.xsdgen.impl.TcPlmXmlXsdInstallToTC.install(Unknown Source)
at com.teamcenter.bmide.tcplmxml.xsdgen.impl.TcPlmXmlXsdInstallToTCMain.main(Unknown Source)
Aborting...
HTML Code:
Hello fpmurphy
My server coludn't handle the test xml file you gave, transfered it in ascii/binary format in ftp and checked

HTML Code:
-> cat test.xml
<?xml version="1.0" encoding="utf-8" ?>
<????????? ??????="2.5-7">
 <?????? id="14">
  <????????????>45-3454-123</????????????>
  <????????>1512</????????>
  <???????? xml:lang="ja">?????</????????>
 </??????>
 <?????? id="64">
  <????????????>45-7894-456</????????????>
  <????????>1435</????????>
  <???????? xml:lang="ja">???????·???</????????>
 </??????>
</?????????>infodba-ie10ux013:/home/infodba
Sponsored Links
    #7  
Old Unix and Linux 05-14-2011
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 19 October 2017, 4:07 PM EDT
Location: Outside Paris
Posts: 4,870
Thanks: 18
Thanked 635 Times in 554 Posts
Quote:
Originally Posted by karghum View Post
Here is what it return

-> set|grep LC
MAILCHECK=600
You have no locale set. What says:

Code:
cat /etc/default/init | grep -v "^#"

?
Quote:
about the error, it's same error and at the same line it start "microfarad"
It looks like you didn't replace all occurences of "µ" by "&#x03BC;".
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Invalid Character lawrance_ps Linux 1 01-16-2011 09:19 AM
Unicode filenames in C++? james2432 Programming 3 02-20-2010 11:34 AM
Find Unicode Character in File azelinsk Shell Programming and Scripting 1 04-11-2008 09:46 PM
How to display unicode characters / unicode string jackdorso Programming 3 05-20-2005 01:09 PM
unicode rein UNIX for Advanced & Expert Users 2 01-18-2005 01:40 PM



All times are GMT -4. The time now is 06:42 AM.