error while encoding a txt file to win-1252

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paula Blau

    error while encoding a txt file to win-1252

    Hi there,

    I have a problem with encoding a file .txt to win-1252.

    $text = recode_string(" ISO-8859-1..win-1252", $text);

    but I get the following error message:

    Fatal error: Call to undefined function: recode_string()

    the same when I trie to recode the whole file

    with recode_file.

    Perhaps wrong Parameters ?
    but wwhich instead ?
    or sombody who knows another solution.
    Will be glad about every hint and hope the question is not to silly for this
    group,

    greetings, Paula


  • Pedro Graca

    #2
    Re: error while encoding a txt file to win-1252

    Paula Blau wrote:[color=blue]
    > I have a problem with encoding a file .txt to win-1252.
    >
    > $text = recode_string(" ISO-8859-1..win-1252", $text);
    >
    > but I get the following error message:
    >
    > Fatal error: Call to undefined function: recode_string()[/color]

    Recode Functions are not available on Windows platforms

    [color=blue]
    > the same when I trie to recode the whole file
    >
    > with recode_file.
    >
    > Perhaps wrong Parameters ?
    > but wwhich instead ?
    > or sombody who knows another solution.[/color]

    Maybe iconv() will do what you want?
    Convert a string from one character encoding to another



    Something like (not tested, never used iconv())

    $text = iconv('ISO-8859-1', 'win-1252', $text);
    --
    USENET would be a better place if everybody read: : mail address :
    http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
    http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
    http://www.expita.com/nomime.html : to 10K bytes :

    Comment

    Working...