From: Alessandro P. <pet...@in...> - 2004-02-26 19:03:10
|
Hi, I have an unicode_fss db (I need to develop a Japanese application) and an asp.net DataGrid. All fields are shown correctly except those for which I call declarative databinding, for example: <%# DataBinder.Eval(Container.DataItem, "OUT_CHANNEL", "<img src=\"img/{0}.gif\">") %> The field OUT_CHANNEL is return from a stored procedure and is a char(1). I should expect values like 'P' or 'E', but instead they are returned as 'P ' or 'E '. Any idea? Meanwhile I'll trying to investigate this item further. Ciao, Alessandro Petrelli. |
From:
<car...@te...> - 2004-02-26 19:25:21
|
Hello: > The field OUT_CHANNEL is return from a stored procedure and is a char(1). > I should expect values like 'P' or 'E', but instead they are returned as 'P > ' or 'E '. > > Any idea? I think that this is because firebird is sending 3 bytes one with the character and another two with spaces :P ( maybe i'm wrong ) i can give a try to it if necessary ( maybe Peter Jacobi can confirm this too ;) ) -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From:
<car...@te...> - 2004-02-26 19:31:15
|
Hello: > I think that this is because firebird is sending 3 bytes one with the > character and another two with spaces :P ( maybe i'm wrong ) i can give > a try to it if necessary ( maybe Peter Jacobi can confirm this too ;) ) Maybe a possible solution for this to declare the field as varchar(1) and modify the provider for return values of varchar fields trimmed if necessary. -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From:
<car...@te...> - 2004-02-26 19:37:08
|
Hello: I'm here one more time ;) > Maybe a possible solution for this to declare the field as varchar(1) > and modify the provider for return values of varchar fields trimmed if > necessary. The real solution is to check that the number of characters in the value is correct, the problem is that this is not valid for system tables, i can check the field name of the query starts with RDB$ but i don't like this solution :P, as always opinions are welcome !! -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Alessandro P. <pet...@in...> - 2004-02-26 19:45:09
|
"Carlos Guzmán Álvarez" <car...@te...> ha scritto nel messaggio news:403...@te...... > Hello: > > I'm here one more time ;) > > > Maybe a possible solution for this to declare the field as varchar(1) > > and modify the provider for return values of varchar fields trimmed if > > necessary. > > The real solution is to check that the number of characters in the value > is correct, the problem is that this is not valid for system tables, i > can check the field name of the query starts with RDB$ but i don't like > this solution :P, as always opinions are welcome !! Or maybe the RDB$SYSTEM_FLAG Ciao, Alessandro Petrelli. |
From:
<car...@te...> - 2004-02-26 20:03:08
|
Hello: > Or maybe the RDB$SYSTEM_FLAG I was thinking on use information already existent in the XSQLDA structure. -- Best regards arlos Guzmán Álvarez Vigo-Spain |
From: Alessandro P. <pet...@in...> - 2004-02-26 19:37:53
|
"Carlos Guzmán Álvarez" <car...@te...> ha scritto nel messaggio news:403...@te...... > Hello: > > > I think that this is because firebird is sending 3 bytes one with the Exact. > Maybe a possible solution for this to declare the field as varchar(1) > and modify the provider for return values of varchar fields trimmed if > necessary. This will work with a varchar(2) field but not with a varchar(1) field, already tested and shown not working :-( ...but....maybe there is something wrong in my code... I need to take some tests, I feel like that field has been inserted with another charset... -- Alessandro Petrelli. |
From:
<car...@te...> - 2004-02-26 19:42:25
|
Hello: > This will work with a varchar(2) field but not with a varchar(1) field, > already tested and shown not working :-( ...but....maybe there is something > wrong in my code... I need to take some tests, I feel like that field has > been inserted with another charset... I think that your code will be right, you will have defined UNICODE_FSS in the connection string and defined the field as UNICODE_FSS. -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Alessandro P. <pet...@in...> - 2004-02-26 19:42:42
|
""Alessandro Petrelli"" <pet...@in...> ha scritto nel messaggio news:c1lgkf$24e$1...@ne...... > This will work with a varchar(2) field but not with a varchar(1) field, > already tested and shown not working :-( ...but....maybe there is something > wrong in my code... I need to take some tests, I feel like that field has > been inserted with another charset... No, it has been inserted correctly... the problem is elsewhere. Ciao, Alessandro Petrelli. |
From: Peter J. <pj...@wa...> - 2004-02-26 21:16:08
|
Hi Carlos, All, Carlos Guzm=E1n =C1lvarez <car...@te...> wrote: > I think that this is because firebird is sending 3 bytes one with the > character and another two with spaces :P ( maybe i'm wrong ) i can give = a > try to it if necessary ( maybe Peter Jacobi can confirm this too ;) ) Inside FB, a char(1) character set UNICODE_FSS takes 3 bytes and the app has to figure out, which are valid. I totally lost (if I ever had) the overview, at which interfaces (let alone other added layers) this shows up= and where it is already hidden. It's a major PITA. I have less time for FB than initially thought, so I fear I must refrain from hacking in the engine proper and hope anybody else cleans up the Unicode issues there. I'm still in the process of adding character set and= collation support via fbintl, but even this has slowed down. Regards, Peter Jacobi |