[GeoNetwork-users] UTF-8 and FILEUPLOAD PROBLEM SOLVED !

Hallo,

until know there was the problem that either the upload function worked but
chars like "é" became smashed or the upload function was disabled and the
chars were fine utf-8 encoded.

I have great news for everybody who wants to upload data and simultaneously
use utf-8 chars like "é", "ö", and "ś" for the polish people.

Edit the famous metadata-edit.xls in the mainForm to:

<form name="mainForm" accept-charset="ISO-8859-1" method="POST"
enctype="multipart/form-data"
action="{/root/gui/locService}/metadata.update">

I don´t really understand why this works, but it does. I tried on two
different machines.
If anyone can explain it I would be very thankful. Is there an econding
specialist outside?

Since the problem exists also in GN 2.2 I hope that it helps for further
development...

roczko

--
View this message in context: http://www.nabble.com/UTF-8-and-FILEUPLOAD-PROBLEM-SOLVED-!-tp15760459s18419p15760459.html
Sent from the geonetwork-users mailing list archive at Nabble.com.

Hi Rocsko,

roczko wrote:

Hallo,
Edit the famous metadata-edit.xls in the mainForm to:

<form name="mainForm" accept-charset="ISO-8859-1" method="POST"
enctype="multipart/form-data"
action="{/root/gui/locService}/metadata.update">

But It doesn't work for all, there was previous post last year. Andrea
fixed that removing enctype
http://www.nabble.com/UTF-8-encoding-problem-tc12290983s18419.html#a12894892

With 22RC2 I have "save & close" and "save" working well with accents
and get trouble only when uploading a document.

Maybe we have to create one form for uploading document (with enctype
define) and one for posting metadata ?

Cheers. Francois

Hi,

if you use accept-charset="ISO-8859-1" then you can also upload data without
the "é" being smashed. It is not the same to the post you mentioned
(http://www.nabble.com/UTF-8-encoding-problem-tc12290983s18419.html#a12894892)
because there only the chars was the problem and not chars and upload.
Try to fill in an "é" in a form and then upload a file. Normaly the "é" will
be displayed in a wrong way. With accept-charset="ISO-8859-1" the char is
absolutely OK after you upload a file to a metadata set.

best regards

roczko

Francois-Xavier Prunayre-2 wrote:

Hi Rocsko,

roczko wrote:

Hallo,
Edit the famous metadata-edit.xls in the mainForm to:

<form name="mainForm" accept-charset="ISO-8859-1" method="POST"
enctype="multipart/form-data"
action="{/root/gui/locService}/metadata.update">

But It doesn't work for all, there was previous post last year. Andrea
fixed that removing enctype
http://www.nabble.com/UTF-8-encoding-problem-tc12290983s18419.html#a12894892

With 22RC2 I have "save & close" and "save" working well with accents
and get trouble only when uploading a document.

Maybe we have to create one form for uploading document (with enctype
define) and one for posting metadata ?

Cheers. Francois

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--
View this message in context: http://www.nabble.com/UTF-8-and-FILEUPLOAD-PROBLEM-SOLVED-!-tp15760459s18419p15762386.html
Sent from the geonetwork-users mailing list archive at Nabble.com.

Hi,
roczko wrote:

Hi,

if you use accept-charset="ISO-8859-1" then you can also upload data without

yep it will be a good workaround for some charsets but will not work for
non ISO-8859-1 charset like chinese, ...

We should probably open a ticket on that issue.

Ciao

Francois

the "é" being smashed. It is not the same to the post you mentioned
(http://www.nabble.com/UTF-8-encoding-problem-tc12290983s18419.html#a12894892)
because there only the chars was the problem and not chars and upload.
Try to fill in an "é" in a form and then upload a file. Normaly the "é" will
be displayed in a wrong way. With accept-charset="ISO-8859-1" the char is
absolutely OK after you upload a file to a metadata set.

What about accept-charset="utf-8", or accept-charset="utf-16"?

---
A. Soroka / Digital Research & Scholarship Dep't : Digital Scholarship R&D / the University of Virginia Library

On Mar 3, 2008, at 6:00 AM, Francois-Xavier Prunayre wrote:

Hi,
roczko wrote:

Hi,

if you use accept-charset="ISO-8859-1" then you can also upload data without

yep it will be a good workaround for some charsets but will not work for
non ISO-8859-1 charset like chinese, ...

We should probably open a ticket on that issue.

Ciao

Francois

the "é" being smashed. It is not the same to the post you mentioned
(http://www.nabble.com/UTF-8-encoding-problem-tc12290983s18419.html#a12894892)
because there only the chars was the problem and not chars and upload.
Try to fill in an "é" in a form and then upload a file. Normaly the "é" will
be displayed in a wrong way. With accept-charset="ISO-8859-1" the char is
absolutely OK after you upload a file to a metadata set.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

I tried utf 8, but it does not work for german and franch special signs. Give
it a try to utf 16.

best regards
roczko

ajs6f@anonymised.com wrote:

What about accept-charset="utf-8", or accept-charset="utf-16"?

---
A. Soroka / Digital Research & Scholarship Dep't : Digital
Scholarship R&D / the University of Virginia Library

On Mar 3, 2008, at 6:00 AM, Francois-Xavier Prunayre wrote:

Hi,
roczko wrote:

Hi,

if you use accept-charset="ISO-8859-1" then you can also upload
data without

yep it will be a good workaround for some charsets but will not
work for
non ISO-8859-1 charset like chinese, ...

We should probably open a ticket on that issue.

Ciao

Francois

the "é" being smashed. It is not the same to the post you mentioned
(http://www.nabble.com/UTF-8-encoding-problem-
tc12290983s18419.html#a12894892)
because there only the chars was the problem and not chars and
upload.
Try to fill in an "é" in a form and then upload a file. Normaly
the "é" will
be displayed in a wrong way. With accept-charset="ISO-8859-1" the
char is
absolutely OK after you upload a file to a metadata set.

----------------------------------------------------------------------
---
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/
projects/geonetwork

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--
View this message in context: http://www.nabble.com/UTF-8-and-FILEUPLOAD-PROBLEM-SOLVED-!-tp15760459s18419p15821525.html
Sent from the geonetwork-users mailing list archive at Nabble.com.

Hi Francois,

could you explain to me where this char problem is nested? I would like to
unterstand.

best regard,

roczko

Francois-Xavier Prunayre-2 wrote:

Hi,
roczko wrote:

Hi,

if you use accept-charset="ISO-8859-1" then you can also upload data
without

yep it will be a good workaround for some charsets but will not work for
non ISO-8859-1 charset like chinese, ...

We should probably open a ticket on that issue.

Ciao

Francois

the "é" being smashed. It is not the same to the post you mentioned
(http://www.nabble.com/UTF-8-encoding-problem-tc12290983s18419.html#a12894892)
because there only the chars was the problem and not chars and upload.
Try to fill in an "é" in a form and then upload a file. Normaly the "é"
will
be displayed in a wrong way. With accept-charset="ISO-8859-1" the char is
absolutely OK after you upload a file to a metadata set.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--
View this message in context: http://www.nabble.com/UTF-8-and-FILEUPLOAD-PROBLEM-SOLVED-!-tp15760459s18419p15821531.html
Sent from the geonetwork-users mailing list archive at Nabble.com.

Hi,
roczko wrote:

Hi Francois,

could you explain to me where this char problem is nested?

I don't know exactly, I had a quick look yesterday, it's in the
resources.upload service which take care of the upload, update the _ref
element to set the url (eg
http://localhost:8080/geonetwork/srv/en/resources.get?id=7&fname=logo.png&access=private)
and then forward the data (all the form elements) to the metadata.update
service.

metadata.update works fine because we can save, save and close.

So the problem is in the resources.upload and probably the problem is
linked to the "multipart/form-data"+encoding because all encoding works
fine on the editor according to the metadata languages if we do not
upload documents.

An option could be to adopt the thumbnails mechanism: one form for the
upload only which will update the metadata thumbnail info. Or an Ajax
mechanism, upload the document and the response could be the url of the
resource (eg
http://localhost:8080/geonetwork/srv/en/resources.get?id=7&fname=logo.png&access=private).
That way we don't have to refresh the form ?

Ciao
Francois

I would like to

unterstand.

best regard,

roczko

Francois-Xavier Prunayre-2 wrote:

Hi,
roczko wrote:

Hi,

if you use accept-charset="ISO-8859-1" then you can also upload data
without

yep it will be a good workaround for some charsets but will not work for
non ISO-8859-1 charset like chinese, ...

We should probably open a ticket on that issue.

Ciao

Francois

the "é" being smashed. It is not the same to the post you mentioned
(http://www.nabble.com/UTF-8-encoding-problem-tc12290983s18419.html#a12894892)
because there only the chars was the problem and not chars and upload.
Try to fill in an "é" in a form and then upload a file. Normaly the "é"
will
be displayed in a wrong way. With accept-charset="ISO-8859-1" the char is
absolutely OK after you upload a file to a metadata set.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork