EPrints Technical Mailing List Archive

Message: #00756


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Unable to edit home page via "Edit XPage Code"?


I use notepad++ to modify the file
if the file is saved unix utf-8 it did not work
i have to save in unix ansi as utf-8
after  that i can modify the file in web interface
i have this line in the code
binmode( DATA, ":utf8" );
everything work find now
Mario

At 11:09 2012-06-18, you wrote:
There used to be a bug with this (but I don't know which version of EPrints you're using...)

Try editing: /opt/eprints3/perl_lib/EPrints/Plugin/Screen/Admin/Config/Edit.pm (replace /opt/eprints3 with your EPrints install path)

Look for:

        # install the new file
        unless( open( DATA, ">$fn" ) )
        {
                $self->{processor}->add_message(
                        "error",
                        $self->{session}->html_phrase( "Plugin/Screen/Admin/Config/Edit:could_not_write",
                                error_msg=>$self->{session}->make_text($!),
                                filename=>$self->{session}->make_text( $self->{processor}->{configfilepath} ) ) );
                return;
        }
        print DATA $data;
        close DATA;


If it looks like the code above, then change to:

        # install the new file
        unless( open( DATA, ">$fn" ) )
        {
                $self->{processor}->add_message(
                        "error",
                        $self->{session}->html_phrase( "Plugin/Screen/Admin/Config/Edit:could_not_write",
                                error_msg=>$self->{session}->make_text($!),
                                filename=>$self->{session}->make_text( $self->{processor}->{configfilepath} ) ) );
                return;
        }
        binmode( DATA, ":utf8" );
        print DATA $data;
        close DATA;


Restart Apache after making the change & let us know if that fixed your problem?

Seb.



On 18/06/12 15:58, Mario Beaudoin wrote:

with web interface "Edit Xpage code"
i think the UTF8 is not reconised by this web interface
but if i transfert the same file with ftp
and update static it work fine
Mario
At 10:38 2012-06-18, you wrote:
Hi Mario,

Do you mean when editing phrases? Or in a "phrases" file?

On my local 3.2.3 dev machine I have a phrases file (encoding = utf-8) with French accents (without having to "code" them) and this just works.

Seb.

On 18/06/12 14:49, Mario Beaudoin wrote:
I

I have the same error
first line of the code is
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
work fine in 3.2.7
now i have to write this
<?xml version="1.0" encoding="iso-8859-1"  standalone="no"  ?>
i have to code all french accent
it is possible to fix that Please

 Best regards,
Mario

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/


*** Options:

http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive:

http://www.eprints.org/tech.php/
*** EPrints community wiki:
http://wiki.eprints.org/

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/