Code Monkey home page Code Monkey logo

Comments (17)

NewEraCracker avatar NewEraCracker commented on September 23, 2024 1

Hello,

Can you please test the changes I've made:
https://github.com/NewEraCracker/encode-explorer/blob/feature/index.php

And let me know if they fix your problem?

Remember changing $_CONFIG['os_charset'] = "UTF-8"; to $_CONFIG['os_charset'] = "CP1251"; for it to behave correctly on your environment.

Also I'd appreciate you testing behavior with mbstring enabled and disabled, so that we can test both mbstring (mb_convert_encoding) and iconv conversion capabilities.

Regards.

from encode-explorer.

NewEraCracker avatar NewEraCracker commented on September 23, 2024 1

Russian vs Swedish. Cyrillic vs Latin... ASCII is of many languages but only one at a time.

@havet: I think I found a transparent way of dealing with the usual encoding issues. Can you test the current code on my fork listing files (and directories) with Swedish filenames, while having set $_CONFIG['os_charset'] = "CP1252"; for your system.

I have done the change that @kofbox sugested. My best idea about why it is needed is because webserver uses UTF-8 winAPI instead of ASCII (unlike PHP).

Thank you both for your input and feedback! I want to tackle this weird encoding bugs to my best knowledge.

from encode-explorer.

kofbox avatar kofbox commented on September 23, 2024

I tested. If you change the $ _CONFIG [ 'os charset'] = "CP1251" are all displayed correctly in the frontend. However, the links to files are not built correctly. On Windows, you need to link to the file built using iconv, but references to the folder were built as they are being built right now. All this is taken into account in a file that is embedded in my first post. Also see the screenshots.
good
not-good

from encode-explorer.

NewEraCracker avatar NewEraCracker commented on September 23, 2024

I have changed the code slightly: f3c33dc
Let me know if the problem is fixed now.

from encode-explorer.

kofbox avatar kofbox commented on September 23, 2024

Nope. Links to files still look like "http://domain.com/_video/%ED%E5%EF%F0%E8%EA%EE%F1%ED%EE%E2%E5%ED%ED%FB%E9%20%E7%E0%EF%E0%F1/%DD%E4%E4%E8%20%CC%B8%F0%F4%E8%201987.flv"

from encode-explorer.

NewEraCracker avatar NewEraCracker commented on September 23, 2024

Try again please and let me know the outcome. I now keep href attribute as-is and only change the text that is shown.

Also made code more generic.

from encode-explorer.

kofbox avatar kofbox commented on September 23, 2024

Change your code at line 3183 to:
print "\t\t<a href=\"".$this->location->getDir(false, true, false, 0, true).$file->getNameHtml(true)."\"";

and its be what we all want :)

from encode-explorer.

havet avatar havet commented on September 23, 2024

Hi,
I've proposed an other solution using iconv:

  1. On upload:
    // Konversion utf-8 > ISO. PT
    $name = iconv ("UTF-8", "ISO-8859-1", $name); //PT

  2. On displaying the content:
    // Konversion ISO > UTF-8. PT
    $folder = iconv ("ISO-8859-1", "UTF-8", $folder); //PT
    print($folder);
    and
    // Konversion ISO > UTF-8. PT
    $fil = $file->getName(); // PT testar
    $fil = iconv ("ISO-8859-1", "UTF-8", $fil); // PT
    print $fil;

This works, but I don't know if this is the best way of doing it.

from encode-explorer.

kofbox avatar kofbox commented on September 23, 2024

havet, your method not working, after this code text shows like that:

àðãóìåíòîâ

from encode-explorer.

kofbox avatar kofbox commented on September 23, 2024

NewEraCracker, also, if i set
$_CONFIG['lang'] = "ru";
and save file index.php in UTF-8 codepage with BOM - some elements not showing. If without BOM - then all ok.

You may want to edit 11 line to:

  • NB!:If you change anything, save with UTF-8 without BOM! Otherwise you may

from encode-explorer.

NewEraCracker avatar NewEraCracker commented on September 23, 2024

done.

Now waiting for further feedback and opinion of project owner.

from encode-explorer.

xmodpt avatar xmodpt commented on September 23, 2024

hello all

grear job and i am loving it aldo i am have some problems with it.

in portugal we have some dif chars like " ç á à ã â " etc...
In the index file all show's ok but the scan resaults that's where the problems begin.
as you can see by the image, in the footer section of the frame the chars show's ok ( set $_CONFIG['lang'] = "pt_PT"; ) in the index file but when it scans the files, any file that have any special char it comes out as blank.

Any ideas ?

kind regards
XmodPT

image

from encode-explorer.

NewEraCracker avatar NewEraCracker commented on September 23, 2024

Boa tarde,

Usa a versão disponível aqui: https://github.com/NewEraCracker/encode-explorer e edita a seguinte linha
$_CONFIG['os_charset'] = "UTF-8"; para $_CONFIG['os_charset'] = "CP1252";

Cumprimentos,
Jorge Oliveira aka NewEraCracker

from encode-explorer.

xmodpt avatar xmodpt commented on September 23, 2024

Boas tardes joao

Muito obrigado pela ajuda.

Bom fds

Nuno Pires

Em 11/09/2016 15:05, "Jorge Oliveira" [email protected] escreveu:

Boa tarde,

Usa a versão disponível aqui: https://github.com/
NewEraCracker/encode-explorer e edita a seguinte linha
$_CONFIG['os_charset'] = "UTF-8"; para $_CONFIG['os_charset'] = "CP1252";

Cumprimentos,
Jorge Oliveira aka NewEraCracker


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#42 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AU--DtaGXcjvOSSE6ufmMBjN15LdGGxZks5qpAq3gaJpZM4H_cG3
.

from encode-explorer.

xmodpt avatar xmodpt commented on September 23, 2024

Dear NewEraCracker

Thank you for all your help.
Your sugestion worked like a charm.

Once again TY

Regards
Nuno Pires
AKA XmodPT

from encode-explorer.

xmodpt avatar xmodpt commented on September 23, 2024

hello Jorge

Thank you for all the help but here i come again with another question:

Is there any way to "Force download" insted of opening in a new window ?

Thank you once more

regards

NP

2016-09-11 15:14 GMT+01:00 Nuno Pires [email protected]:

Boas tardes joao

Muito obrigado pela ajuda.

Bom fds

Nuno Pires

Em 11/09/2016 15:05, "Jorge Oliveira" [email protected] escreveu:

Boa tarde,

Usa a versão disponível aqui: https://github.com/NewEraCrack
er/encode-explorer e edita a seguinte linha
$_CONFIG['os_charset'] = "UTF-8"; para $_CONFIG['os_charset'] = "CP1252";

Cumprimentos,
Jorge Oliveira aka NewEraCracker


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#42 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AU--DtaGXcjvOSSE6ufmMBjN15LdGGxZks5qpAq3gaJpZM4H_cG3
.

from encode-explorer.

xmodpt avatar xmodpt commented on September 23, 2024

second question:

is there a way to make the code detect if it is being opened on a cellphone
so it automatically changes to "mobile" version ?

On 12 September 2016 at 22:13, Nuno Pires [email protected] wrote:

hello Jorge

Thank you for all the help but here i come again with another question:

Is there any way to "Force download" insted of opening in a new window ?

Thank you once more

regards

NP

2016-09-11 15:14 GMT+01:00 Nuno Pires [email protected]:

Boas tardes joao

Muito obrigado pela ajuda.

Bom fds

Nuno Pires

Em 11/09/2016 15:05, "Jorge Oliveira" [email protected]
escreveu:

Boa tarde,

Usa a versão disponível aqui: https://github.com/NewEraCrack
er/encode-explorer e edita a seguinte linha
$_CONFIG['os_charset'] = "UTF-8"; para $_CONFIG['os_charset'] =
"CP1252";

Cumprimentos,
Jorge Oliveira aka NewEraCracker


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#42 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AU--DtaGXcjvOSSE6ufmMBjN15LdGGxZks5qpAq3gaJpZM4H_cG3
.

from encode-explorer.

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.