Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use unicode anywhere #89

Open
GoogleCodeExporter opened this issue Jan 8, 2016 · 3 comments
Open

Use unicode anywhere #89

GoogleCodeExporter opened this issue Jan 8, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

1. create route with unicode chars in it
2. open /allurl
3. or try to use that route

Expecting for 2. correctly output name of the route and for 3. working route

I'm using DooPHP version 1.5 (stable) with demos.

Why you not using unicode? I believe you need to do at least
header('Content-Type:text/html; charset=utf-8');
on every page. When using only ASCII there are no size penalty but when 
somebody try to use unicode it be ok.

2. will be fixed by setting that header

To workaround I'm doing in my index.php
Doo::app()->setRawHeader('Content-Type:text/html; charset=utf-8');

is it good approach?

Original issue reported on code.google.com by th-net@ya.ru on 30 Oct 2013 at 3:07

@GoogleCodeExporter
Copy link
Author

For routes with unicode you need to urldecode REQUEST_URI before using:

DooUriRouter.php line 247

        $requestedUri = urldecode($_SERVER['REQUEST_URI']);

Original comment by th-net@ya.ru on 30 Oct 2013 at 3:30

@GoogleCodeExporter
Copy link
Author

And than use
mb_strtolower and mb_substr
with $requestedUri

Original comment by th-net@ya.ru on 30 Oct 2013 at 3:32

@GoogleCodeExporter
Copy link
Author

I specify charset=utf-8 in my templates.

See if posting your request to https://groups.google.com/forum/#!forum/doophp 
will produce the result you expected.

Original comment by roman...@gmail.com on 4 May 2014 at 6:32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant