For my current project i work with include files (.inc) inside visual studio.
What i did is changed some inc files to asp.
But when i consult my page i have a strange behavior with special characters.
Examples
André for André
Priv� for privé
When i use html.encode i do not get any good result.
In versioncontrol i noticed the only thing that's changed are the extentions for the include files.
Is this normal behavior ?
What did i mis or do wrong ?
I found the cuase of my problem.
In visual studio each file i create is in UTF-8 encoding.
What i need to do is change the encoding from UTF-8 to ANSI.
Problem solved.
In vs-2019, you can save a file with encoding:
From the File menu, choose Save File As, and then click the drop-down button next to the Save button.
The Advanced Save Options dialog box is displayed.
Under Encoding, select the encoding to use for the file.
[https://learn.microsoft.com/en-us/visualstudio/ide/how-to-save-and-open-files-with-encoding?view=vs-2019#to-save-a-file-with-encoding][1]
Related
Today, I learn how to localize my Flex application and to support multiple languages. The tutorials on-line are great. However, non of them mention the Arabic locale.
So basically, I created the Arabic (Jordan) locale files in the SDK folder by using:
copylocale en_US ar_JO
I navigated to the locale folder and I was able to see the ar_JO folder in there... So I assume everything went smooth.
Next, I followed the tutorials (www.babelfx.org) and was able to localize my test application in English, French, and Arabic. Clicking on any of those languages switches the labels of my simple form/into the desired language... however:
When switching to the Arabic language the labels turn into empty square symbols. If you are wondering, yes I can open a notepad and type Arabic text and save it successfully.
When I type Arabic text into the text boxes, I can see the Arabic words that I typed correctly (the labels are still square symbols).
Any ideas what I might be missing here??
I tried changing the font of my application (right on the application tag I set the fontFamily) into Simplified Arabic which comes by default on Windows.
Thanks
Have you embedded a font into your swf which can render Arabic? Are you using that font? If the answer is no to either, then I suggest reading up on the subject.
One thing to remember about Flash and fonts is that it has incredible power which comes from the fact that one is able to embed actual fonts into the swf itself. One also needs to remember that Flash is incredibly finicky and is prone to throwing fits if you fail to do so.
The solution is to change the context-type to UTF-8. Three ways to accomplish this from within Flex Builder:
(Option 1) Right click the file from the File Navigator and select Properties
(Option 2) With the file open, navigate to the File menu and choose Properties
(Option 3) With the file open, press Alt + Enter to bring up the file Properties
Once the properties window is displayed, you will see the option to change the file encoding from Default to Other (UTF-8).
Note: At least for me, once I changed the content-type to UTF-8, I had to close my unsaved file, open it back up, and paste my contents back into the file in order to clear the error message. Then clean the project (Project -> Clean...) and let it rebuild.
I found the solution. Actually, I didn't have to embed any fonts or anything in order to get it working.
My problem was the encoding in the resources.properties file. I opened it in Notepad++, then I noticed the Encoding menu. At that time, I remembered reading something about that the encoding of the resources files should be UTF-8. So I converted the encoding to UTF-8 from the menu, compiled, it didn't work! After couple of retries and cleaning the project, it worked successfully!!!
Just a reminder for everybody (as I have fallen into this while working this problem out):
For mx components, embedded fonts must have the embedAsCFF set to false.
I'm really stuck. I'm working on an integration project where I'm creating a html fragment using ASP.NET. This fragment will be included as part of another site. The html fragment is created using a simple ASP.NET page with a minimal code behind file.
Te site that will include this html fragment is running PHP. The developer there is complaining that my code is sending the byte order mark as part of the html fragment and this is making his life difficult.
I'm using Visual Studio 2010 for development. I've saved the relevant aspx and aspx.cs files as UTF-8 without signature. However, this doesn't seem to have made a difference and now I'm pretty much out of ideas. The rest of the site is set to use UTF-8 as standard (defined in web.config).
Where should I be looking to alter the BOM behaviour for my aspx file?
If you save the file in Visual Studio I believe it will keep adding the BOM. You need to use a different editor to remove the marker such as NotePad++.
Actually in the advanced save as dialog in Visual Studio there is also an option to save UTF-8 without signature. Have you tried this?
It's confirmed in this question.
You can also use plain old NotePad to save with a different encoding.
Save As...Encoding DropDown.
I have to redesign a website in HTML but there is some code which is not editable in dreamviewer "codeoutsidehtmlislocked false dreamweaver" so please tell me how i can edit this.
Open your parent template, and change the false to true. Save your template and update the child pages. Should be good to go from there.
You could use Notepad, Notepad++, Smultron or any simple text editor to remove that part of the code that stops you editing in Dreamweaver.
Save your changes, then it should be ok.
If you're working on remote files, you might need soemthing like Filezilla to open the files in your editor of choice.
Simplest solution: Open those files with Notepad and edit the concerned part.
You can also try Microsoft Expression web.
Dreamweaver dose not activate code highlighting/hinting/error-checking unless you are using a file type that it knows, (.php .htm .html .css .js .aspx etc) but I am working on a project written in ASP.NET and I have an issue, Dreamweaver doesn't recognize all the ASP.NET file types. .aspx works, and .vb works but .master files show as plain text, no hinting/highlighting no design view. I can edit as .aspx and then save-as constantly but it is a big hassle. Dose anyone know a way to make Dreamweaver think it is editing a .aspx (for proper hinting) but actually be a .master?
For other people who may well be having the same problem following the instructions on this Adobe page, as #rtpHarry rightly points out there is another version of the document that needs updating.
I think this will work for CS5, but the instructions below is for Dreamweaver Creative Cloud.
Close Dreamweaver, go to
C:\Users[user]\AppData\Roaming\Adobe\Dreamweaver
CC\en_US\Configuration\DocumentTypes
Open MMDocumentTypes.xml in Notepad. Note that this Roaming Data is a hidden folder so you may need to change your Windows settings
Change the line for the type of file extension you want to edit. For example, adding a .CSHTML extension to enable regular HTML Code Coloring goes from this:
<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi" file="Default.html" writebyteordermark="false" mimetype="text/html">
To this
<documenttype id="HTML" internaltype="HTML" winfileextension="cshtml,html,htm,shtml,shtm,stm,tpl,lasso,xhtml" macfileextension="cshtml,html,htm,shtml,shtm,tpl,lasso,xhtml,ssi" file="Default.html" writebyteordermark="false" mimetype="text/html">
Reopen Dreamweaver and see the changes!
Are you on a Mac? If so, it (probably) shouldn't be more than a little digging in the .APP's PLIST file... something like:
<dict>
<key>com.adobe.dreamweaver</key>
<string>ASPX</string>
<key>public.filename-extension</key>
<array>
<string>aspx</string>
<string>QQZYX</string> <!-- add this line -->
</array>
<key>public.mime-type</key>
<string>text/html</string>
</dict>
I'm on a Windows machine right now, so I can't verify this myself, but you should be able to right-click, open Dreamweaver as a "bundle," open Contents, open the info.plist file with a text editor (Smultron, TextMate) and add another string to the file-extension association array for ASPX files.
In my example, both .aspx files and .qqzyx files will open as ASPX files. You're using Dreamweaver so I assume you're familiar with XML :)
Update: Looks like you want the Extensions.txt file. Instructions here:
http://kb2.adobe.com/cps/164/tn_16410.html
Recently, my Visual Studio 2008(with Resharper 4.5) has started to reformat asp tags into lowercase.
Example:
<asp:Repeater runat="server" id="rp">
becomes
<asp:repeater runat="server" id="rp">
and I can't find a way to make it not do this. I use Ctrl-k Ctrl-d to reformat.
I've tried resetting the Visual Studio settings, turning off Resharper. Nothing seems to bite.
I did delete a huge Reflected something folder in my Documents and Settings folder last week, could this be the reason?
Go to Tools | Options...
Expand: Text Editor - HTML
Select the "Format" node, and see what settings you have for "Capitalization" of "Server tag" and "Server attributes - I think the default is now "Lowercase" - try setting that to "Assmebly definition" instead.
More information on these options can be found here:
Format, HTML, Text Editor, Options Dialog Box
I had the same (or very similar) issue.
I also deleted some (but not all) files in the folder
C:\Documents and Settings[username]\Application Data\Microsoft\VisualStudio\9.0\ReflectedSchemas
The reason I did this is because I'm subject to a frankly daft limit on the size of my (Windows XP) roaming profile :-(
After I did this VS intellisense and document auto-formatting started behaving as if it didn't know what the <asp: tags were and treated all the html as plain html (formatted tag names and attributes in lowercase).
I found this blog post by Tim Vasil which pointed me to the solution.
Here's what I did to fix this:
Deleted all files in C:\Documents
and Settings[username]\Application
Data\Microsoft\VisualStudio\9.0\ReflectedSchemas
Deleted all files in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files
Deleted the .suo User Option file (the file has the same name as the solution file with .suo in place of .sln)
(Note: VS eventually regenerates the various files in it's own time...)
I found the cause. I put back that 650MB big folder in C:\Documents and Settings\My User Id\Application Data\Microsoft\VisualStudio\9.0 and everything seems to be back to normal.
Thanks for trying to help me!
I'm not sure about a permanent fix, but what you can do is select the troublesome coding then hit CTRL+K followed by CTRL+F, so in order..
CTRL + K, F
This will auto format the coding (and make it the proper case).
If this doesn't work then it might be an auto-format issue/setting