Ask a Question related to Macromedia Contribute General Discussion, Design and Development.

  1. #1

    Default Charset

    Hi, I'm a newbee, also in english.
    The thing is that I have a kind of javascript based search engine that
    use a .txt as its database, it has several field delimited by tabs.
    What I want to do is using the same application to diferents projects. I
    just change the look, the datas and I have another beautiful serach
    engine.
    How I don't know much about javascript, I made a PHP script that builds
    a .txt with identical structure to the one I have just explained and
    fill it with the datas. But It doesn't work.
    I have noticed that the javascript says anywhere something about
    "unicode" charset. The PHP script make a entirely new file each time
    from a Access database, I do this because I needed to modify some
    database content in some fields, and I think that It doesn't use the
    same charset that javascript. I belive this because I tested to paste
    same records directly from txt formed by PHP script to original txt and
    when saving WordPad tell me something about that I'm saving without
    format and I am going to loose any format issue. And after this, I could
    see throught the serach engine the records pasted in the txt.

    I am using WinXP, Nusphere, Dreamweaver, etc, everything in spanish (so
    the charset, I think It is ISO LATIN number-015, with Euro, I'm just
    guessing)

    Thank's a lot for any help.

    Borja González
    [email]oavicena123@yahoo.es[/email]

    Remove 123 manually.


    --
    Posted via Mailgate.ORG Server - [url]http://www.Mailgate.ORG[/url]
    Borja Gonzalez Guest

  2. Similar Questions and Discussions

    1. Charset Issue
      I am having troubles with our Coldfusion MX 7 server displaying the proper Japanese characters. We have a dev server with Coldfusion 5, and...
    2. CFChart and UTF-8 charset
      Hello to everybody. I have a problem with the CFChart. I have to create a chart (and this is ok after installing Xlibraries on the server) but I...
    3. Help - charset problem
      Hi My supplier just upgraded control panel to Plesk 7. Suddenly all my php/mysql pages stopped supporting "chrset" in the meta tag, for example: ...
    4. mssql and charset
      Hello I use the MSSQL function for connecting to a MSSQL database but i have a problem with the charset. My database is in...
    5. charset and MS SQL Server
      I use php on a windows XPpro and a MS SQL Server 2000 The result of the query are different of the content of the table example : in database...
  3. #2

    Default Re: Charset

    Borja Gonzalez <borja@nccextremadura.org> wrote:
    > How I don't know much about javascript, I made a PHP script that builds
    > a .txt with identical structure to the one I have just explained and
    > fill it with the datas. But It doesn't work.
    What doens't work? You can't create the file or you can't reproduce the
    required structure of it?

    [charsets]
    > I am using WinXP, Nusphere, Dreamweaver, etc, everything in spanish (so
    > the charset, I think It is ISO LATIN number-015, with Euro, I'm just
    > guessing)
    Take a look at the thread '"smart" quotes in PHP'
    (Message-ID: <Xns943380961AE3Awwwnowherefoo@24.24.2.166>) which might
    give you some hindts on how to convert oce you figure out whtat the
    actual encoding is.

    --

    Daniel Tryba

    Daniel Tryba Guest

  4. #3

    Default Re: Charset

    Hi,
    > What doens't work? You can't create the file or you can't reproduce the
    > required structure of it?
    What it doesn't work is the javascript search engine. I mean, I manage
    to build the file
    and it looks like the one that i need, but the javascript doesn't read
    it.
    > [charsets]
    > > I am using WinXP, Nusphere, Dreamweaver, etc, everything in spanish (so
    > > the charset, I think It is ISO LATIN number-015, with Euro, I'm just
    > > guessing)
    >
    > Take a look at the thread '"smart" quotes in PHP'
    > (Message-ID: <Xns943380961AE3Awwwnowherefoo@24.24.2.166>) which might
    > give you some hindts on how to convert oce you figure out whtat the
    > actual encoding is.
    I have read it but and... correct me I am wrong:
    The original database was encoded using unicode, this I have read from
    the javasript code:

    <object id="db" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83"
    VIEWASTEXT>
    <param NAME="DataURL" VALUE="datdb.dll">
    <param NAME="UseHeader" VALUE="True">
    <param NAME="CharSet" VALUE="unicode">
    <param NAME="FieldDelim" VALUE=" ">
    </object>

    The new database I have built It in not unicode but other encoding
    system, so I anyhow have
    to convert it:

    $fp=fopen("datdb.txt","w");

    $cabecera="\"Titulo\"\t\"Descripcion\"\t\"Localida d\"\t\"Seccion\"\t\"Enlaces\"\t\"Correo\"\r\n";
    fputs($fp, $cabecera);
    $link=mysql_connect("localhost");
    mysql_select_db("test",$link);
    $query="SELECT Titulo,Autores,Tema,Archivo FROM abstracts";
    $resultado=mysql_query($query,$link);
    while ($regdb=mysql_fetch_array($resultado, MYSQL_ASSOC)) {
    $regtxt="\"<a href=\"\"abstracts/";
    $regtxt.=$regdb["Archivo"];
    $regtxt.="\"\" class=\"\"rsURL\"\">";
    $regtxt.=ereg_replace("\r\n","
    ",ucfirst(strtolower($regdb["Titulo"])));
    $regtxt.="</a>\"";
    $regtxt.="\t\"";
    $regtxt.=ereg_replace("\r\n"," ",$regdb["Autores"]);
    $regtxt.="\"\t\"";
    $regtxt.="Badajoz";
    $regtxt.="\"\t\"";
    $regtxt.="Sesiones, " . $regdb["Tema"];
    //$regtxt.="\"\t\"<span></span>\"\t\"<span></span>\"";
    $regtxt.="\"\r\n";
    fputs($fp, $regtxt);
    fclose($fp);


    And my question is:
    How do I manage that php script write the file encoded in unicode?

    Thanks a lot
    Borja


    --
    Posted via Mailgate.ORG Server - [url]http://www.Mailgate.ORG[/url]
    Borja Gonzalez Guest

  5. #4

    Default Re: Charset

    Borja Gonzalez <borja@nccextremadura.org> wrote:
    >> Take a look at the thread '"smart" quotes in PHP'
    >> (Message-ID: <Xns943380961AE3Awwwnowherefoo@24.24.2.166>) which might
    >> give you some hindts on how to convert oce you figure out whtat the
    >> actual encoding is.
    >
    > I have read it but and... correct me I am wrong:
    [snip]
    > The new database I have built It in not unicode but other encoding
    > system, so I anyhow have
    You know which?

    [some string]
    > fputs($fp, $regtxt);
    > fclose($fp);
    >
    >
    > And my question is:
    > How do I manage that php script write the file encoded in unicode?
    As already mentioned in the thread mentioned above:
    1-utf8_encode
    2-iconv
    3-str_replace

    1 is preferable but your data needs to be in iso-8859-1 (if you are
    using iso-8859-15 you could translate the generic curreny char to the
    EUR manually)

    2 is optionally, so your server might lack iconv support

    3 if all else fails your last hope.

    --

    Daniel Tryba

    Daniel Tryba Guest

  6. #5

    Default charset

    When we open a file (made in dreamweaver: " xxxxx.cfm" ) with contribute, choose edit, then publish: all characters like ?, ?, ?, ? in the body become unreadable. :(
    arthur tieck Guest

  7. #6

    Default Re: charset

    Do you have a meta charset tag in the header? And if so, what charset are you
    using?

    iso-8859-1 or UTF-8 should cover all of those characters. If you have either
    of these, then how are those specific characters encoded in the HTML?

    mzanime.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139