Coder Social home page Coder Social logo

Comments (15)

honeybadge avatar honeybadge commented on May 10, 2024 2

The German Umlauts are also not displayed properly "ä ö ü ?"
Using UTF8 should fix theses issues.

from projectsend.

lenamtl avatar lenamtl commented on May 10, 2024

I'm having same issue with french #25

from projectsend.

ignacionelson avatar ignacionelson commented on May 10, 2024

Haven't tried it yet, but how about this?
On templates/default/template.php, change, on line 132,
echo htmlentities($file['description']);
to
echo htmlspecialchars($file['description']);

Please let me know if that worked for you.

Thanks!

from projectsend.

mnlabs avatar mnlabs commented on May 10, 2024

Unfortunately it didn't help. Also tried changing all instances of 'htmlentities' in template.php and in manage-files.php.

from projectsend.

lenamtl avatar lenamtl commented on May 10, 2024

The problem is the way the data is saved in the DB.
It is not save correctly
we should not see this in the DB ó
but this instead ó

I have checked on most of the web application I use that use UTF-8
like Mantis
and the data is save like ó not ó

from projectsend.

mnlabs avatar mnlabs commented on May 10, 2024

This. It looks like lenamtl is right. The exception is edit page, where value ó is inserted into text area/input field which browser later display as ó the same way this post doesn't make sense for example in web-mail client.

+-------------------------------------+-------------------------------------------------+
| filename                            | description                                     |
+-------------------------------------+-------------------------------------------------+
| debian 8.0.0 amd64 netinst          | óóó żćźółźćś        |
| czołg                               | Test public downloadu                           |
| ółżźćś                       | óóóó                |
+-------------------------------------+-------------------------------------------------+

from projectsend.

ignacionelson avatar ignacionelson commented on May 10, 2024

Another option could be to set the db each time to utf8 after it connects, with the following query

SET NAMES utf8;

It will probably break other things, and some functions may need to be changed, but if you do that query just before the one that gets the files, the encoding might change.

I can't try it right now, I will give it a go later. If anyone can run a quick test, it would help a lot!

from projectsend.

ignacionelson avatar ignacionelson commented on May 10, 2024

And a second one could be changing
echo htmlentities($file['description']);
to
echo htmlentities(utf8_decode($file['description']));

from projectsend.

lenamtl avatar lenamtl commented on May 10, 2024

I believe that the htmlentities is not a good approach ...

We should use something like this
(I took it from http://stackoverflow.com/questions/26971036/php-prevent-from-encoding-%C3%A9-to )

The data of your file is UTF-8
When you use string functions with constant strings (e.g. str_replace('e', 'é', $foo)) this file is UTF-8
The database connection you use allows the transportation of UTF-8 encoded characters and is configured for that (SET NAMES 'utf8' for MySQL)
The Content-Type header (or meta-tag) of your page tells the browser to expect UTF-8

Temporary solution I posted:
Here is what I did with previous old version this may applied to this new version too I have not tried yet.
https://code.google.com/p/clients-oriented-ftp/issues/detail?id=279&q=french

I plan switching the whole code to PDO but this will take a some time....

Note: sometimes PO file can give an error if you have ' in the string so to fix that you can use this ’

from projectsend.

mnlabs avatar mnlabs commented on May 10, 2024

I plan switching the whole code to PDO but this will take a some time....

Please do. Can we also switch to Postgresql as default backend? It's sooo much nicer to work with than Mysql.

from projectsend.

lenamtl avatar lenamtl commented on May 10, 2024

My knowledge of PostgreSQL is very limited but when using PDO the advantage is we can use other PDO drivers.

For now I'm still working on updating the whole template to latest Bootstrap and other jQuery scripts version this is lot of work ... ( I have 40% done)

Then I plan to update the application to PDO, lot of work ...

I plan to share both forks when completed and tested.

from projectsend.

lenamtl avatar lenamtl commented on May 10, 2024

Hi just to let you know the new update is using PDO (prepared statement)
#114

if anyone using latin characters could test the new version this will be appreciated.

Unfortunately the new version is not fixing the latin characters encoding but we want to know if anything is different from previous version.
Thanks

from projectsend.

lenamtl avatar lenamtl commented on May 10, 2024

See #182 after a lot of debugging
I have found a way that seems to work for french, this need to be tested to make sure but till now it's working fine.

from projectsend.

Kerstin2017 avatar Kerstin2017 commented on May 10, 2024

hello,
is there between time a solution?
In the database are the files with the umlauts (ä, ö,...)
image

image

but in User Font :
image

Can anybody help ? :-)

Thanks

from projectsend.

lenamtl avatar lenamtl commented on May 10, 2024

You have to modify the scripts according to this: #182

Sorry there is no shortcut to fix the problem.

from projectsend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.