in

The ORM Foundation

Get the facts!

3 control chars problem

Last post Thu, Sep 9 2010 15:38 by mnnoon. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • Thu, Sep 9 2010 3:01

    • mnnoon
    • Top 10 Contributor
      Male
    • Joined on Wed, Apr 16 2008
    • Lawndale, CA
    • Posts 60

    3 control chars problem

    Noticed 3 strange control chars when automating mysql scripts with the latest Norma tool.

     first three control chars

    EF BB BF ???   These control chars don't appear in notepad or any standard visual studio editors in windows. However, the following environments see the 3 control chars vividly, mysql,  linux vi or emacs editor, etc...  Doesn't look like this is a feature.

    In mysql the error I get when I run a batch command is as follows:

    C:\Users\marc\Documents\Visual Studio 2008\Projects\baameh.com\BahLib\mdl>echo off
    Enter password: *******
    ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use n
    ear '
    CREATE TABLE `User`
    (
            userId INT AUTO_INCREMENT NOT NULL,
            emailName VARCHA' at line 1
    C:\Users\marc\Documents\Visual Studio 2008\Projects\baameh.com\BahLib\mdl>

     This is the batch command: 

    C:\Users\marc\Documents\Visual Studio 2008\Projects\baameh.com\BahLib\mdl>type runme.bat
    echo off
    del happy.sql
    type ".\app.txt" > ".\happy.sql"
    type ".\baameh.MySQL.sql" >> ".\happy.sql"
    mysql -u root -p < ".\happy.sql"

    :) hunting,

    Marc

  • Thu, Sep 9 2010 3:48 In reply to

    • mnnoon
    • Top 10 Contributor
      Male
    • Joined on Wed, Apr 16 2008
    • Lawndale, CA
    • Posts 60

    Re: 3 control chars problem

    Whoops, I always send something and then can't seem to edit it.  Anyways, I was wandering if I can't change mysql or postgres sql files to have an option of not saving in utf-8 or utf-16 b/c the mysql or postgressql have trouble with these file unless the file is converted to standard ascII format.

    thx,

    Marc

  • Thu, Sep 9 2010 10:15 In reply to

    Re: 3 control chars problem

    Hi Marc,

    These three mystery characters are byte marks for a UTF-8 encoding.

    Try the following:

    1. Open C:\Program Files\Common Files\Neumont\DIL\Transforms\DDILtoMySQL.xslt in Visual Studio
    2. Find the xsl:output tag
    3. Click in the value of the encoding attribute and press Ctrl-J
    4. Choose the encoding you want from the list (probably us-ascii)
    5. Save the file
    6. Right-click on your .orm file and choose 'Run Custom Tool'
    7. See if you got the correct encoding

    Report back here if this fixes your problem.

    -Matt

  • Thu, Sep 9 2010 15:38 In reply to

    • mnnoon
    • Top 10 Contributor
      Male
    • Joined on Wed, Apr 16 2008
    • Lawndale, CA
    • Posts 60

    Re: 3 control chars problem

    Wow, that Ctrl-J is pretty nifty, can't believe I didn't know about it.   It works! Yes

    Marc

Page 1 of 1 (4 items)
© 2008-2024 ------- Terms of Service