2

私は夢中になっています、私はすべて、urlencode、htmlエンコードを試しましたが、urlrewriting.netはアラビア語のクエリ文字列を??として読んでいます キャラクター

助けてくれて本当にありがとう

4

6 に答える 6

3

If you have .NET 3.5 SP1 installed, I'd recommend you to switch to System.Web.Routing instead of the UrlRewriting.net library. I've recently switched from UrlRewriting.net to System.Web.Routing myself and routing is so much better thought out and better integrated with the ASP.NET pipeline.

If you have the opportunity to switch, I'd recommend it. If not, please post your UrlRewriting.net configuration file so we can tweak the regular expressions that apparently aren't working. Please post some examples of URIs that don't work too.

Also, what's the values defined in the web.config section:

<system.web>
  <globalization requestEncoding="utf-8"
                 responseEncoding="utf-8"
                 fileEncoding="utf-8" />
</system.web>

Like in the above example, use UTF-8. Also be sure to encode the characters as UTF-8 in the URI.

于 2009-02-27T09:42:20.550 に答える
1

IIS 7 アプリケーションを "クラシック モード" で実行するとどうなりますか (使用可能なオプションとしてインストールが必要になる場合があります)。

于 2009-06-11T14:29:48.063 に答える
1

これを試してみてください。より高速で、問題もありません。

"~/News/2008/10/10/newsid/تجربة.aspx" ここで、newsid は記事の ID です。

データベースからタイトルを取得します: 'select * from news where id = ' & newsid これは、次のコマンドよりもはるかに高速です: "select * from news where title='"& title &"'"

于 2009-06-29T17:26:09.813 に答える
0

更新:信じられないかもしれませんが、問題は非常に奇妙であることがわかりました。IIS7統合モードで、Visual Studio Devサーバーからページを起動してみてください。Unicode文字は問題なく解析されますが、起動するとIIS7からのページそれはあなたに????を与えるでしょう 文字。

体がここで光を遮ることを願っています

于 2009-03-15T19:59:55.377 に答える
0

リンクを含むページとクエリ文字列を解析するページの両方にUTF-8エンコーディングがあることを確認することで、問題を解決したようです。

しかし今、私は別の問題を抱えていますFirefoxはハイパーリンクとアドレスバーのリンクを正しく表示していますが、IE6とIE7ではこのようになっています

mysite/News/2008/10/10/%D8%AA%D8%AC%D8%B1%D8%A8%D8%A9.aspx

IE 6と7はリンクを正常に解析していますが、これは醜いですが、解決策は何ですか?

于 2009-03-05T01:09:41.980 に答える