עברית ב asp.net = תסכול... ../images/Emo7.gif
חברים, עזרה, הושיעו! בניתי אפליקציית asp.net שכוללת עברית, והרבה. השרת ממוקם בחו"ל (ארה"ב). במחשב שלי העברית נראית בסדר, אבל אם אני עושה upload לשרת, העברית הופכת להיות סימני שאלה. קראתי את כל הטיפים והעזרה המוצעת בפורום, אבל שום דבר לא עזר עד הסוף: אם אני רואה עברית נכון, זה קורה כאשר אני הופך את ה charset של הדף ל Unicode, אבל אז כל ה Submitים נדפקים, כלומר השדות המתקבלים בשרת הופכים להיות ג'יבריש טהור. אני ממש מתוסכל מכל העניין הזה, כי זה כל כך עניין של איזו הגדרה טכנית, שזה פשוט מוציא אותי מדעתי. ותאמינו לי, כבר ניסיתי הרבה קומבינציות, ובסוף תוצאה אחת מהשתיים: תצוגת עברית דפוקה, או תצוגה נכונה אבל הערכים המתקבלים (בפקדי הסרבר) דפוקים. לצורך ההמחשה, צרפתי קוד של קובץ סתמי, וכן את ה web.config . אנא עזרו והושיעו... קובץ סתמי:
חברים, עזרה, הושיעו! בניתי אפליקציית asp.net שכוללת עברית, והרבה. השרת ממוקם בחו"ל (ארה"ב). במחשב שלי העברית נראית בסדר, אבל אם אני עושה upload לשרת, העברית הופכת להיות סימני שאלה. קראתי את כל הטיפים והעזרה המוצעת בפורום, אבל שום דבר לא עזר עד הסוף: אם אני רואה עברית נכון, זה קורה כאשר אני הופך את ה charset של הדף ל Unicode, אבל אז כל ה Submitים נדפקים, כלומר השדות המתקבלים בשרת הופכים להיות ג'יבריש טהור. אני ממש מתוסכל מכל העניין הזה, כי זה כל כך עניין של איזו הגדרה טכנית, שזה פשוט מוציא אותי מדעתי. ותאמינו לי, כבר ניסיתי הרבה קומבינציות, ובסוף תוצאה אחת מהשתיים: תצוגת עברית דפוקה, או תצוגה נכונה אבל הערכים המתקבלים (בפקדי הסרבר) דפוקים. לצורך ההמחשה, צרפתי קוד של קובץ סתמי, וכן את ה web.config . אנא עזרו והושיעו... קובץ סתמי:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb" Inherits="heb_test_01.WebForm1" codePage="1255"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ... <HEAD> <title>WebForm1</title> <LINK href="Styles.css" type="text/css" rel="stylesheet"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1255"> <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1"> <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1"> <meta name="vs_defaultClientScript" content="JavaScript"> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> </HEAD> <body MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> <asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 144px; POSITION: absolute; TOP: 144px" runat="server" Width="153px" Height="29px" BackColor="#FFFFC0">שלום</asp:Label> </form> </body> ...
והנה web.config :<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <!-- DYNAMIC DEBUG COMPILATION Set compilation debug="true" to insert debugging symbols (.pdb information) into the compiled page. Because this creates a larger file that executes more slowly, you should set this value to true only when debugging and to false at all other times. For more information, refer to the documentation about debugging ASP.NET files. --> <compilation defaultLanguage="vb" debug="true" /> <!-- CUSTOM ERROR MESSAGES Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable. Add <error> tags for each of the errors you want to handle. "On" Always display custom (friendly) messages. "Off" Always display detailed ASP.NET error information. "RemoteOnly" Display custom (friendly) messages only to users not running on the local Web server. This setting is recommended for security purposes, so that you do not display application detail information to remote clients. --> <customErrors mode="RemoteOnly" /> <!-- AUTHENTICATION This section sets the authentication policies of the application. Possible modes are "Windows", "Forms", "Passport" and "None" "None" No authentication is performed. "Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to its settings for the application. Anonymous access must be disabled in IIS. "Forms" You provide a custom form (Web page) for users to enter their credentials, and then you authenticate them in your application. A user credential token is stored in a cookie. "Passport" Authentication is performed via a centralized authentication service provided by Microsoft that offers a single logon and core profile services for member sites. --> <authentication mode="Windows" /> <!-- AUTHORIZATION This section sets the authorization policies of the application. You can allow or deny access to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous (unauthenticated) users. --> <authorization> <allow users="*" /> <!-- Allow all users --> <!-- <allow users="[comma separated list of users]" roles="[comma separated list of roles]"/> &