in reply to Re: datetime insertion problem
in thread datetime insertion problem

And why do i need to use encode to switch from greek => utf8?

Replies are listed 'Best First'.
Re^3: datetime insertion problem
by CountZero (Bishop) on May 28, 2006 at 08:40 UTC
    I'm not the big expert on encoding, but I think the whole encoding thing must be perfectly aligned for it to work. It is best to have the same encoding set on both the input machine/layer, the storage layer ( i.e. the database) and the output machine/layer. If somewhere in this chain of things there is a different encoding then you get "funny" characters. So if you start with "greek" encoding, you better have this all the way through to avoid problems.

    Other monks much more versed in the ways of Unicode and the like probably can tell you more about it or you can have a look at perluniintro and perlunicode.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

      I try to use the same encoding with the logic you mentoned but for some reason this wont get applied as it concerned to files with greek filanames and the time.
      Its not me that messed the encodings, its them.
        Well, in that case immediately encode the Greek files to UTF8, handle all internal business in UTF8 and just prior to outputting to a file decode it back to the Greek codepage. See perlio, perlio::encoding and Encode. I think the Greek codepage is cp1253 (codepage and graphical representation).

        CountZero

        "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law