Problem with character alfa, beta ...

I have a problem with special characters, when I do a query in Tamino Interactive Interface, I can see the special simbols (&alfa;, β) but when I do the same in java, I get the symbol “?”.

How can I solve my problem???

Thanks :slight_smile:

hi,

can u give some more information? If you can provide your query which works in interactive interface it would be great…

sonal.

Hello ???.

When you write “… do the same in java …”, do you mean “when I execute the same query in Java, then print the results to the command line”?

If so, the problem might be that the character codepage being used in the DOS box / command shell does not have glyphs available for the special symbols.
You could try writing the query results to a file in your Java program, then opening the file with an editor that you know can display the symbols.

I hope that helps,
Trevor.

Hi,

Yes, It means when “I execute the same query in Java”.

I use a jsp to show the information.
I have written the query result to a file and result is a box.

The code is:
public static String consultaStringXquery(TConnection conexion,String coleccion,String XQuery) throws OperacionException
{
TXMLObjectAccessor acceso;
acceso=conexion.newXMLObjectAccessor(TAccessLocation.newInstance(coleccion),TJDOMObjectModel.getInstance());
String documento=“”;
TResponse respuesta=null;
String salida=null;
Vector v= new Vector();
try
{
respuesta=acceso.xquery(TXQuery.newInstance(XQuery));
//Creamos un iterador para movernos por los distintos resultados obtenidos
TXMLObjectIterator iterador;
iterador=respuesta.getXMLObjectIterator();
if (!iterador.hasNext()) return null;
while(iterador.hasNext())
{
TXMLObject objeto=iterador.next();
objeto.setEncoding(“ISO-8859-1”);
objeto.setId(null);
System.out.println(objeto.getEncoding());
StringWriter bufferedwriter = new StringWriter();
objeto.writeTo(bufferedwriter);
documento=bufferedwriter.toString();
v.add(documento);
}


thanks :slight_smile:

I have done some tests, and I have find out when I insert a ANSI characters, for example 181 →