Now have a test awaiting a fix :o(

 @airport = Airport.new( valid_airport_attributes )
 @airport.save.should be_true
 @airport.reload
 @airport.name.should == valid_airport_attributes[:name]

 expected: "Aeropuerto de las AmÚricas",
      got: "Aeropuerto de las Am´┐¢ricas"

On Jul 8, 3:20 pm, George <[email protected]> wrote:
> Yep, I concur. Nice little test. (I ran it on dm+sqlserver)
> So, is there the solution?!
>
> On Jul 8, 1:00 pm, kristian <[email protected]> wrote:
>
> > hi George,
>
> > can you see if that script works for you (needs sqlite3 
> > installed)http://gist.github.com/467919
> > or change it to use sqlserver.
>
> > init.rb sounds OK to me, just before you configure/use the database.
>
> > with the above script it is the same: it is correct in the database
> > but wrongly decoded after retrieving it.
>
> > regards Kristian
>
> > On Jul 8, 1:03 pm, George <[email protected]> wrote:
>
> > > Hi Kristian, thanks for the suggestions.
> > > Alas neither seemed to have any effect. (Characters are still
> > > displaying incorrectlyhttp://yfrog.com/2tld9peventhoughthey are
> > > correct in the databasehttp://yfrog.com/0kr2jp)
> > > That said, I was not quite sure where to put the $KCODE = 'u' in my
> > > app.  I tried it at the start of the init.rb file (it's a Merb app)
> > > Cheers,
> > > George
>
> > > On Jul 8, 6:47 am, kristian <[email protected]> wrote:
>
> > > > when I run a little test with ruby I see the same as you when I run
> > > > with -Ku flag set it is OK for both ruby as well jruby.
>
> > > > jruby -Ku .....
>
> > > > or inside the program set
> > > > $KCODE = 'u'
>
> > > > regards
> > > > Kristian
>
> > > > On Jul 7, 7:50 pm, George <[email protected]> wrote:
>
> > > > > This issue relates to the way DM fetches and saves data from/to
> > > > > sqlserver.
>
> > > > > Here are a couple of rows of data:
>
> > > > >   1: Aeropuerto de las Américas
> > > > >   2: Aeropuerto de las Américas
>
> > > > > Row 1 is the migrated data from another sql server. The accented 'e'
> > > > > does not display correctly in my web ui.
> > > > > Row 2 is the same data pasted into the web ui and saved. It then
> > > > > fetches and displays it just fine.
>
> > > > > Clearly I have a mismatch between the encoding used by sql server and
> > > > > the encoding used by my web app.
>
> > > > > Please can you suggest how to tackle this? I'm not really sure where
> > > > > the problem lies or how to specify encodings in DM. (Am using DM on
> > > > > JRuby to connect to SQLServer.)
>
> > > > > Many thanks
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to