PDA

View Full Version : wrong character encoding?


jbarciela
10-14-2004, 05:34 PM
Hello all,

I'm trying to run an app almost identical to the simplest here: http://www.laszlosystems.com/lps-2.2/docs/guide/data_app.html

it just list the content of a database table, the problem is that I'm getting non-printable characters in the flash output.

just wondering if anyone may have an idea about why, or if anyone have found similar situations

I'm using McKoi 1.0.3 database, Debian linux (via Mepis) , java 5 and tomcat 5.0.28

I apologize if I made this post too long, but maybe it helps to show the code. It's below.

here is the code of my "app"

<?xml version="1.0" standalone="no"?>
<!DOCTYPE canvas SYSTEM "http://www.laszlosystems.com/lps/tools/lzx.dtd" >

<canvas bgcolor="#D4D0C8">
<dataset name="dset" src="sele.jsp" request="true" type="http"/>

<view name="list" datapath="dset:/orders/order">
<simplelayout axis="x"/>
<text datapath="@id"/>
<text datapath="@number"/>
<text datapath="@part"/>
<text datapath="@price"/>
<text datapath="@quantity"/>
</view>

</canvas>

and here is my jsp:

<%@ page import="java.sql.*"%>

<orders>
<%
Connection connection = null;
try {
Class.forName("com.mckoi.JDBCDriver").newInstance();
connection = DriverManager.getConnection("jdbc:mckoi://localhost/", "admin_user", "aupass00");
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("select * from Order");
while (rs.next()) {
%>
<order
id="<%=rs.getString("id")%>"
number="<%=rs.getString("number")%>"
part="<%=rs.getString("part")%>"
price="<%=rs.getString("price")%>"
quantity="<%=rs.getString("quantity")%>"
/>
<%
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
connection.close();
} catch (SQLException e) {
}
}
%>
</orders>

my table was created like this:

create table Order
(
id INTEGER not null,
number LONGVARCHAR(20),
part LONGVARCHAR(20),
price NUMERIC(1024),
quantity NUMERIC(1024)
);

insert into Order (id,number,part,price,quantity) values (0,'OR1','PA01',25.95,1);
insert into Order (id,number,part,price,quantity) values (1,'OR2','PA01',26.95,2);
insert into Order (id,number,part,price,quantity) values (2,'OR3','PA01',27.95,1);
insert into Order (id,number,part,price,quantity) values (3,'OR4','PA01',28.95,3);
insert into Order (id,number,part,price,quantity) values (4,'OR5','PA01',29.95,1);
insert into Order (id,number,part,price,quantity) values (5,'OR6','PA01',21.95,6);
insert into Order (id,number,part,price,quantity) values (6,'OR7','PA01',22.95,1);
insert into Order (id,number,part,price,quantity) values (7,'OR8','PA01',23.95,7);

Thanks a lot
Jaime

jbarciela
10-15-2004, 07:28 AM
In case you think I didn't read that Laszlo doesn't support unicode yet: I did, I know, I know.

The weird thing here is that I'm only using plain-old-boring-vanilla ascii characters, but I'm still getting the nonprintable characters in flash.

And that is with flash on mozilla/linux and flash on firefox/winXP

Anyone..., anyone?