Suneido

Integrated Application Platform

  • Home
  • Learning
    • Suneido Manual
    • Beginners
      • Inside Suneido
      • The Suneido Programming Language
      • The Suneido Database
      • Installing Suneido
      • Building Suneido
      • IDE Go To Tour
      • Upgrading To A New Release
    • Advanced
      • Canvas Control
      • DrawControl Part 1
      • DrawControl Part 2
      • DrawControl Part 3
      • SAX Like XML Processing
      • A Plug-In Architecture
      • A Simple Wizard Framework
      • An HTML Include Facility
      • An RSS 2 Feed Creator
      • MIME Generation
      • A New Add-on Facility
      • Workspace Improvement Hack
    • Mockito for Suneido
    • The Suneido Task Scheduler
    • Contributing To Suneido
    • Contributor Assignment of Copyright
    • Language Translation
    • Future Directions
    • Interview With Andrew Mckinlay
  • Forum
    • Announcements
    • Internals & Enhancements
    • Cookbook
    • General
  • FAQ
  • Screenshots
  • Downloads
  • Links

[SOLVED]Database crashes when OS code page changes

Integrated Application Platform › Forums › General › [SOLVED]Database crashes when OS code page changes

  • This topic has 5 replies, 2 voices, and was last updated 8 years, 6 months ago by jaska_lee.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • August 27, 2014 at 8:47 am #785
    jaska_lee
    Participant

    Hi guys,

    After changing “Region and Language” –> “Language for non-Unicode programs” in windows 7 to a different language, when I try to login suneido, the database crashes saying it needs to be restored.

    This seems to be a big topic related to database character set/codepage stuff. I am not good in this area, only saw some other databases implemented codepage setup options. For now, I just want to implement a check which compares the client OS language setup with server OS language setup. If they don’t match, an error is prompted.

    I see suneido could retrieve the OS date format setup which leads me to believe this could be possible.

    Any idea is appreciated.

    August 27, 2014 at 4:15 pm #1085
    amckinlay
    Keymaster

    If Suneido crashes (or the process is killed), then the next time you run it, it will require a rebuild.

    I am not sure why the code page would make it crash. It might cause something to fail e.g. in Init or somewhere else in the GUI, but that should not cause a crash.

    The database itself doesn’t care about character sets or code pages. It just stores 8 bit chars. Changing the character set or code page will not make the database invalid or cause a rebuild. If different clients interpret the data in different ways then that could cause problems.

    To compare client to server, you can use ServerEval to run code on the server e.g to get the language setup.

    August 28, 2014 at 1:40 am #1086
    jaska_lee
    Participant

    This happened a few weeks back when I tried to flip around between English and Thai language setup. And it happened couple of times. I thought I could always warn the customer to use the same language setup before they login the system, so I gave it a lower priority.

    But today, when i try to reproduce the same issue, it does not happen. Maybe I haven’t got the environment setup right.

    Nonetheless, this is necessary in my case. When one user is typing unicode language like Thai under Thai language setup, he can type and see Thai characters nicely. But if another user is connecting to the system with a different language setup like English, he wont be able to see or type Thai, the Thai characters are shown as unreadable strings. So, a check to make sure this setup is consistent across all clients makes sense.

    I will give it a try later, thanks a lot andrew!

    August 28, 2014 at 2:47 pm #1087
    jaska_lee
    Participant

    Hi Andrew,

    In order to compare “Language for non-Unicode programs” under control panel from both client and server, I first tried to retrieve the language code. But i couldn’t find the right constant to pass into method:

    GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE.SLONGDATE, buf = Buffer(80), 80)

    There is a website which provides some constants and I have tried most of them but it didnt give me what I wanted.

    http://www.gnu-darwin.org/www001/ports-1.5a-CURRENT/lang/opendylan/work/opendylan-1.0beta4/sources/win32/win32-kernel/winnls.dylan

    Any suggestion?

    Thanks

    August 28, 2014 at 5:45 pm #1088
    amckinlay
    Keymaster

    I found this:

    http://stackoverflow.com/questions/217801/getting-language-for-non-unicode-programs

    Suneido doesn’t have definitions for the functions it talks about, but they should not be hard to add

    August 29, 2014 at 6:53 am #1089
    jaska_lee
    Participant

    nice, a new class “GetSystemDefaultLocaleName” worked out,

    dll long Kernel32:GetSystemDefaultLCID()

    It returns 1054 which matches “Language for non-Unicode programs” setup according to Microsoft language id definitions.
    http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx

    thanks!

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In

Search Forums

Log In
Welcome to the new Suneido Web Site and Forum.
Register
Lost Password
users of the previous PHPBB Forum should be able to log in with their previous username and password.

Recent Topics

  • Alpha copy of gSuneido to play with
  • how to start jsuneido ?
  • Problem Starting Suneido…
  • Dialog not showing buttons
  • New link for Suneidojo

Contact Us | Legal Statement | Privacy Statement | SiteMap

Copyright © 2023 Axon® Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language