URL encoded dataRSS

2 replies

Last post Feb 10, 2020 02:46 PM by Qassim.Nasir

  • URL encoded data

    Feb 08, 2020 11:22 AM|Qassim.Nasir|LINK

    Is IIS will convert URLencoded data in GET method e.g.

    GET/index.php/..../reviewers?searchPhrase=%S9%85%...

    to utf8 id the Database is encoded in utf8 and if bot what to do?

  • Re: URL encoded data

    Feb 10, 2020 07:02 AM|Jalpa Panchal|LINK

    Hi,

    Could you please explain your issue in detail?IIS will decode the URL automatically and not sure whether IIS itself will encode the URL. You could try to set header to modify the HTTP header:
    header('Content-Type: text/html; charset=utf-8');

    In my opinion  PHP files themselves are UTF-8 encoded.

    Regards,

    Jalpa

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: URL encoded data

    Feb 10, 2020 02:46 PM|Qassim.Nasir|LINK

    Thanks

    We are  using OJS opene source applciation which formaulat the GET as below

    GET /idex.php/....../serachPhrade=%D9%86%D8... (Urlencodes for some Arabic ). When we are using

    Apache serer  we get the following Query to Mysql DBMS with correct Arabice

    <div style="font-size: 12px; font-family: HelveticaNeue, serif, EmojiFont; font-weight: normal;"></div>

    58 Query          SELECT COUNT(*) FROM (select count(*) as user_count from `users` as `u` left join `user_user_groups` as `uug` on  `uug`.`user_id` = `u`.`user_id` left join `user_groups` as `ug` on `ug`.`user_group_id` = `uug`.`user_group_id` left join `user_settings` as `ugl` on `ugl`.`user_id` = `u`.`user_id` and `ugl`.`setting_name` = 'givenName' and `ugl`.`locale` = 'ar_IQ' left join `user_settings` as `ugpl` on `ugpl`.`user_id` = `u`.`user_id` and `ugpl`.`setting_name` = 'givenName' and `ugpl`.`locale` = 'ar_IQ' left join `user_settings` as `ufl` on `ufl`.`user_id` = `u`.`user_id` and `ufl`.`setting_name` = 'familyName' and `ufl`.`locale` = 'ar_IQ' left join `user_settings` as `ufpl` on `ufpl`.`user_id` = `u`.`user_id` and `ufpl`.`setting_name` = 'familyName' and `ufpl`.`locale` = 'ar_IQ' left join `user_settings` as `us` on `u`.`user_id` = `us`.`user_id` left join `user_interests` as `ui` on `u`.`user_id` = `ui`.`user_id` left join `controlled_vocab_entry_settings` as `cves` on `ui`.`controlled_vocab_entry_id` = `cves`.`controlled_vocab_entry_id` left join `review_assignments` as `ra` on `u`.`user_id` = `ra`.`reviewer_id` where `ug`.`context_id` = '1' and `ug`.`role_id` in (4096) and `u`.`disabled` = 0 and (lower(u.username) LIKE '%أحمد%' or lower(u.email) LIKE '%أحمد%' or (`us`.`setting_name` = 'givenName' and lower(us.setting_value) LIKE '%أحمد%') or (`us`.`setting_name` = 'familyName' and lower(us.setting_value) LIKE '%أحمد%') or (`us`.`setting_name` = 'affiliation' and lower(us.setting_value) LIKE '%أحمد%') or (`us`.`setting_name` = 'biography' and lower(us.setting_value) LIKE '%أحمد%') or (`us`.`setting_name` = 'orcid' and lower(us.setting_value) LIKE '%أحمد%') or lower(cves.setting_value) LIKE '%أحمد%') group by `u`.`user_id`) _ADODB_ALIAS_

    <div style="font-size: 12px; font-family: HelveticaNeue, serif, EmojiFont; font-weight: normal;"></div> <div style="font-size: 12px; font-family: HelveticaNeue, serif, EmojiFont; font-weight: normal;">While  IIS do a strange translation as below</div> <div style="font-size: 12px; font-family: HelveticaNeue, serif, EmojiFont; font-weight: normal;"></div> <div style="font-size: 12px; font-family: HelveticaNeue, serif, EmojiFont; font-weight: normal;">lower(u.username) LIKE '%ù…ø­ù…ø¯%' or lower(u.email) LIKE '%ù…ø­ù…ø¯%' or (`us`.`setting_name` = 'givenName' and lower(us.setting_value) LIKE '%ù…ø­ù…ø¯%') or (`us`.`setting_name` = 'familyName' and lower(us.setting_value) LIKE '%ù…ø­ù…ø¯%') or (`us`.`setting_name` = 'affiliation' and lower(us.setting_value) LIKE '%ù…ø­ù…ø¯%') or (`us`.`setting_name` = 'biography' and lower(us.setting_value) LIKE '%ù…ø­ù…ø¯%') or (`us`.`setting_name` = 'orcid' and lower(us.setting_value) LIKE '%ù…ø­ù…ø¯%') or lower(cves.setting_value) LIKE '%ù…ø­ù…ø¯%') and (lower(u.username) LIKE '%ùƒù…ø§ù„%' or lower(u.email) LIKE '%ùƒù…ø§ù„%' or (`us`.`setting_name` = 'givenName' and lower(us.setting_value) LIKE '%ùƒù…ø§ù„%') or (`us`.`setting_name` = 'familyName' and lower(us.setting_value) LIKE '%ùƒù…ø§ù„%') or (`us`.`setting_name` = 'affiliation' and lower(us.setting_value) LIKE '%ùƒù…ø§ù„%') or (`us`.`setting_name` = 'biography' and lower(us.setting_value) LIKE '%ùƒù…ø§ù„%') or (`us`.`setting_name` = 'orcid' and lower(us.setting_value) LIKE '%ùƒù…ø§ù„%') or lower(cves.setting_value) LIKE '%ùƒù…ø§ù„%') group by `u`.`user_id` LIMIT 0,15</div> <div style="font-size: 12px; font-family: HelveticaNeue, serif, EmojiFont; font-weight: normal;"></div> <div style="font-size: 12px; font-family: HelveticaNeue, serif, EmojiFont; font-weight: normal;">So the serach will not get any as there are no characters like those.</div>