Jump to content
Search Community

LoaderMax: UTF-8 non-latin characters in URL cause error

fixedmachine test
Moderator Tag

Recommended Posts

Hi Jack!

 

Wow! LoaderMax has a potential to become best loader for flash :D I think that we'll be asking 'how we could live without it before?' (just like with TweenMax). Thanks for another great tool!

 

After a little bit of testing, I've found that there is a problem with loading files with non-latin UTF-8 encoded characters in names. I know that normally we should avoid using it in URLs but for now there are even internationalized domain names with unicode characters, so we should take this into consideration.

 

I uploaded test file with Polish characters in name here:

http://test.wlodkowski.net/loadermax/zażółćgęśląjaźńZAŹÓŁĆGĘŚLĄJAŹŃ.jpg

 

so you could test it yourself.

 

I just slightly modified your original demo sites.xml file so now it using UTF-8 encoding and defines the same jpg file but first time with unescaped utf-8 characters and another time escaped:





 

XML available here:

http://test.wlodkowski.net/loadermax/sites.xml

 

When you try to load file with name defined with unescaped utf-8 characters this error will occur:

errorio.png

 

If you try to load file with escaped file name, everything is fine.

 

I'm using 2010-05-28 (version 0.65) of LoaderMax.

 

I hope that this will help in some way :)

Link to comment
Share on other sites

Do you think the best solution is to add code in LoaderMax to have it always escape() file names as opposed to relying on the user to do that (or use valid ones to begin with)? This certainly seems like an edge case scenario and I usually try to keep a minimalist approach to classes like LoaderMax (feature bloat can easily creep in and cause file size and speed to rapidly degrade - not that this particular feature would make a massive difference).

Link to comment
Share on other sites

I don't really know what causing that error: flash player or LoaderMax itself.

 

Always escaping file names will do the trick probably.

 

You know it's an "edge case scenario" for English users, but for others this could be really annoying problem especially in case when everything is automated and Flash developer isn't responsible for files on the server.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...