Ask a Question related to Macromedia Contribute General Discussion, Design and Development.
-
Borja Gonzalez #1
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
-
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... -
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... -
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: ... -
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... -
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... -
Daniel Tryba #2
Re: Charset
Borja Gonzalez <borja@nccextremadura.org> wrote:
What doens't work? You can't create the file or you can't reproduce the> 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.
required structure of it?
[charsets]Take a look at the thread '"smart" quotes in PHP'> 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)
(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
-
Borja Gonzalez #3
Re: Charset
Hi,
What it doesn't work is the javascript search engine. I mean, I manage> What doens't work? You can't create the file or you can't reproduce the
> required structure of it?
to build the file
and it looks like the one that i need, but the javascript doesn't read
it.
I have read it but and... correct me I am wrong:> [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.
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
-
Daniel Tryba #4
Re: Charset
Borja Gonzalez <borja@nccextremadura.org> wrote:
[snip]>>> 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:You know which?> The new database I have built It in not unicode but other encoding
> system, so I anyhow have
[some string]As already mentioned in the thread mentioned above:> fputs($fp, $regtxt);
> fclose($fp);
>
>
> And my question is:
> How do I manage that php script write the file encoded in unicode?
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
-
arthur tieck #5
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
-
mzanime.com #6
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



Reply With Quote

