Postgres / Glorp

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Postgres / Glorp

Alan Knight-2
At 01:54 PM 5/14/2007, Norbert Hartl wrote:
On Mon, 2007-05-14 at 12:32 -0400, Alan Knight wrote:
> As far as Glorp goes, DatabasePlatform has an attribute
> "characterEncoding", which will be used for certain types of
> conversions. But I'm not sure what the interaction with the Squeak
> postgresql drivers would be there. Setting that would probably work OK
> as long as they're not using binding.
>
I can't find the attribute in the squeak port. Is this newer code
which hasn't been ported yet?

It could be. It was introduced in the 0.3.143 version, which is fairly old, but I think the Squeak port is fairly dated at this point. Todd Blanchard has almost finished an updated port, but then got busy, so he hasn't finished it yet.


--
Alan Knight [|], Cincom Smalltalk Development

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross


Reply | Threaded
Open this post in threaded view
|

Re: Postgres / Glorp

J J-6
In reply to this post by Ramiro Diaz Trepat
Personally, I just use EncodedKom39 or something like that.


>From: "Ramiro Diaz Trepat" <[hidden email]>
>Reply-To: The general-purpose Squeak developers
>list<[hidden email]>
>To: "The general-purpose Squeak developers
>list"<[hidden email]>
>Subject: Re: Postgres / Glorp
>Date: Mon, 14 May 2007 11:43:40 -0300
>
>Sorry Philippe, I am not sure what you mean.
>
>When you say "a custom Kom" I suppose you mean extensions like
>Norbert's.  But then, when you say "or get WideStrings".  What do you
>mean? from where?
>
>What happened between 3.8 and 3.9?
>Why does Kom not work with utf8 in 3.9?
>There are plenty of Spanish, German, Swedish and French speakers in
>this list, what do you guys use in production?
>I suppose that Norbert's solution of adding hooks to translate strings
>everytime fixes the problem, but it also introduces a major
>performance penalty, because every string that comes and goes has to
>get translated (everytime, unless you cache the translations you
>make), and I guess these translations are not that cheap.
>
>
>
>On 5/14/07, Philippe Marschall <[hidden email]> wrote:
>>No, you can either use a custom Kom or get WideStrings.
>>
>>2007/5/14, Ramiro Diaz Trepat <[hidden email]>:
>> > Wow...
>> > So I assume that mostly everyone not in an English speaking country
>> > with a Seaside application in production is using Squeak 3.8?
>> > Is that correct?
>> >
>> >
>> >
>> >
>> > On 5/14/07, Philippe Marschall <[hidden email]> wrote:
>> > > 2007/5/14, Ramiro Diaz Trepat <[hidden email]>:
>> > > > Indeed, probably another great thing it would  be if I could
>>configure
>> > > > Seaside to directly send me utf8 strings from the input taken on a
>> > > > form´s entry fields.
>> > > > Is it possible?
>> > >
>> > > Yes, this is what WAKom is doing. Just remember that you also have to
>> > > send utf8 strings to Seaside. Unfortunately WAKom does not work on
>> > > Squeak 3.9.
>> > >
>> > > Cheers
>> > > Philippe
>> > >
>> > > >
>> > > > On 5/13/07, Ramiro Diaz Trepat <[hidden email]> wrote:
>> > > > > Hello Todd and Marcelo,
>> > > > >    I am using Squeak 3.9.
>> > > > >    I know about how to set the encoding on postgres.  Indeed,
>>utf8 is
>> > > > > the encoding I need on the database.
>> > > > >    What I want to know is if there is any place on the Postgres,
>>Glorp
>> > > > > or MagritteGlorp packages where I could configure for the strings
>>to
>> > > > > be translated to Squeak´s default (I think it´s iso).
>> > > > >    If I have, for example a Person on Glorp, and I want to set a
>>last
>> > > > > name like mine Díaz (with an accented vowel), coming from a
>>Magritte
>> > > > > form for instance, on the setter I translate it to UTF8
>>(#isoToUtf8)
>> > > > > before I assign it to my class i.var.  And it gets stored on the
>> > > > > database with no errors.  Later on, when Glorp "hydrates" my
>>instance,
>> > > > > of course it brings a weird string like  "DÃ≈az", instead of
>>"Díaz".
>> > > > >    Of course I would love that conversion to happen automatically
>>with
>> > > > > a little configuration.
>> > > > >    Otherwise, what are you guys doing?
>> > > > >
>> > > > >
>> > > > >
>> > > > > On 5/13/07, marcelo Cortez <[hidden email]> wrote:
>> > > > > > Ramiro
>> > > > > >
>> > > > > >  I'm postgres user , i hope help you , postgres
>> > > > > > encondig can be configurated at database creation,
>> > > > > > postgres client can configurated using statements
>> > > > > > SET CLIENT_ENCODING TO 'value';
>> > > > > > take a look at
>> > > > > > http://www.postgresql.org/docs/8.2/static/multibyte.html
>> > > > > > best regards
>> > > > > > mdc
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > --- Ramiro Diaz Trepat <[hidden email]> escribió:
>> > > > > >
>> > > > > > > Well... sorry for building this thread by myself.
>> > > > > > > The issue now is that conversion does not happen
>> > > > > > > automatically.  I can
>> > > > > > > properly store a string on a UTF8 database, by
>> > > > > > > previously converting
>> > > > > > > it using #isoToUtf8.
>> > > > > > > But when strings come back after a query (using
>> > > > > > > Glorp), they are not
>> > > > > > > converted to iso, and hence they show all screwed
>> > > > > > > up.
>> > > > > > > Is there any place in Glorp or the Postgres driver
>> > > > > > > to configure the
>> > > > > > > encoding of the underlying database for these
>> > > > > > > conversions to happen
>> > > > > > > automatically?
>> > > > > > > Thanks !
>> > > > > > >
>> > > > > > > r.
>> > > > > > >
>> > > > > > >
>> > > > > > > On 5/13/07, Ramiro Diaz Trepat <[hidden email]>
>> > > > > > > wrote:
>> > > > > > > > Sorry, it does work.
>> > > > > > > > I don´t know what happend.
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > On 5/13/07, Ramiro Diaz Trepat
>> > > > > > > <[hidden email]> wrote:
>> > > > > > > > > I was unable to use databases with UTF8
>> > > > > > > encoding, only SQL_ASCII
>> > > > > > > > > encoding worked for me.
>> > > > > > > > > is it something trivial to configure that I did
>> > > > > > > not see or is it a limitation?
>> > > > > > > > > Thanks
>> > > > > > > > >
>> > > > > > > > > r.
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > __________________________________________________
>> > > > > > Preguntá. Respondé. Descubrí.
>> > > > > > Todo lo que querías saber, y lo que ni imaginabas,
>> > > > > > está en Yahoo! Respuestas (Beta).
>> > > > > > ¡Probalo ya!
>> > > > > > http://www.yahoo.com.ar/respuestas
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > >
>> > >
>> > >
>> > >
>> >
>> >
>> >
>> >
>>
>>
>>
>>


>

_________________________________________________________________
PC Magazine’s 2007 editors’ choice for best Web mail—award-winning Windows
Live Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_pcmag_0507


12