Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] How to make numeric-charactor-reference disable

Tatsuya,

I don't really know the code but it looks to me like the XML file is opened for output with java.io.FileWriter in _writeXMLDocument in SharedContext.java. (http://dev.eclipse.org/viewsvn/index.cgi/trunk/plugins/org.eclipse.higgins.idas.cp.xmlfile/src/org/eclipse/higgins/idas/cp/xmlfile/SharedContext.java?view=log&root=Technology_HIGGINS&pathrev=18055 )

Docs for java.io.FileWriter say it uses default character encoding and does not allow specification of Charset, unlike its superclass OutputStreamWriter. Is the Java default character encoding (I think java.nio.charset.Charset.defaultCharset() ) UTF-8 in this environment? Also, if you use an ISO-8859-1 character like รค does it get encoded as an NCR or passed raw?

http://www.docjar.com/docs/api/org/dom4j/io/OutputFormat.html mentions Encoding but it looks to me like this is merely written as the encoding attribute of the XML declaration at the beginning of the file, rather than actually determining the encoding of characters being written.

Joseph

On Jan 21, 2010, at 5:18 AM, Tatsuya KATSUHARA wrote:

> Hello,
> 
> I'm now building InformationCard IdP(BanditIdP), and I encountered i18n
> problem. The problem is that IP/SecurityToken cointains attribute values
> as numeric character reference, which I want to use the value as row
> UTF-8 string...
> 
> The problem is as follows:
> 1)Bandit use "org.eclipse.higgins.idas.cp.xmlfile.*" classes(XML file
> context)
> http://code.bandit-project.org/trac/wiki/Bandit%20IdP%20Deploy%20Configure#DefineIdASContexts
> 
> 2)I registered some multi-byte attributes via the IdP(using IdAS XML
> file context)
> 
> 3)XML file context stores muti-byte attributes as "numeric character
> reference"(e.g. たろう).
> 
> 4)Using a cardselector(e.g. CardSpace), cardselector recieved the sts
> including attributes as numeric character reference form. And,
> InformationCard RP recieved the attributes as the same form...
> 
> 
> XML file starts with "<?xml version="1.0" encoding="UTF-8"?>", so I
> think that XML file can hold multi-byte data as raw form directly and
> issue InfoCard(*.crd) including raw multi-byte string.
> 
> In fact, Using managed cards issued by
> www.federatedidentity.net(Microsoft) , I got the SecurityToken contain
> raw UTF-8 multi-byte string.
> 
> 
> It happens often in the web, but I could find no solution for this case.
> 
> If someone knows how to control or fix translation (raw UTF-8 multi-byte
> string <-> numeric charactor reference), please let me know any hint...???
> 
> 
> Thanks to all
> 
> --
> Tatsuya
> 
> 
> _______________________________________________
> higgins-dev mailing list
> higgins-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/higgins-dev

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Back to the top