Non-ASCII filenames mangled in deployment package - visual-studio-2010

I deploy my VS2010 MVC3 project using "Build Deployment Package". The problem is that a couple of files have national (Swedish) characters ÅÄÖ in their filenames, and the deployment package gets these filenames wrong.
For example "Köpvillkor.pdf" becomes "K+Âpvillkor.pdf". The file has the right name in the unzipped "PackageTmp" folder, but inside the "<projname>-<version>.zip" file the filename is mangled, so it seems the problem lies in the way the package is zipped, i.e. it gets an UTF-8 encoded filename from the file system but stores it without conversion as ASCII or WIN1252 or some such inside the zip.
Is there any way to fix this?

If you use IIS to import the deployment package zip file, the filenames will be converted back to the proper encoding.
Unfortunately Winzip, 7-zip and even Windows Explorer Zip extension don't understand the filenames encoding, manual deployment is not possible.

I found today that you can uncheck "Create deployment package as a zip file" and then zip it manually. I use WinZip to zip it manually, and the non-ASCII characters are correctly preserved.

Related

android-studio project error .zip extract: path too long

I just recently tried to extract a .zip file that contains a android-studio project from my usb key. I moved the .zip file on my desktop and then used the 'extract-all' from windows. During the extract, I get this message:
Now If I would change the name of the class, it would probably give me errors when I build gradle. Is there a way to simply override this error message ? Is this a windows issue or is it an android-studio problem (naming files too long)?
So far, I've tried extracting each file but it didn't work. I've also tried it on other computers and its the same result... Any ideas on how to proceed ?
Try using 7zip link, this will likely solve your problem!

Is it possible to convert a BAK type app to a APK type app on smartface?

An app I created using Smartface is a .bak type file.Is it possible to convert a .bak app to an .apk app so it can be tested as most mobile app testing sites don't allow a .bak type file app to be tested.
I've tried converting it to .bar and then converting it to .apk however it wasn't successful.
Thankyou
Actually Smartface creates .apk or .zip files as output. The .bak file you mentioned should be the backup file of the project itself.
When you open and modify a project in Smartface IDE it automatically creates .bak file of the project file.

Dereferences a xml file from xcode

I made a huge mistaking in renaming my xml file from xcode and I'm not sure how to fix it. My app has a feature that reads all local xml files built with the project. So now it is reading 2 of the same xmls with different names.
I tried deleting the file, added it back in, and Dereferencing it but no luck. I also made sure to delete my app and re building the project. When I do a full system scan for the xml file nothing pops up. The xml file is currently in the Trash.
Another issue might have been with the svn remote server but I tried svn rm --delete filename and it said the file does not exist. ( I tried the project directory as well as a few other sub directories).
Is there a way to Dereference/delete the file from the project?

Visual Studio publish (deployment) package contains Mercurial (hg) files (Orchard)

I have a C# solution for a web project (actually it's an Orchard CMS site, but this is not important) that's version controlled under Mercurial (using Tortoise HG BTW), which has some projects that are in separate repositories (and are subrepositories of the solution repository). Hg files are never included anywhere in the solution, they are nowhere shown in Visual Studio.
When I try to publish the solution (or build the deployment package) with the "Only files needed to run the application" option selected under the web project properties the package built contains the hg files (like the whole .hg folder) of the subrepositories.
This is mostly harmless (besides publishing a bunch of unnecessary files), but publishing can also fail completely with the following message:
Error Copying file SubRepoFolder.hg\store\data_libraries_parallel_extensions_extras_coordination_data_structures_async_coordination_async_reader_writer.cs.i to obj\Release\Package\PackageTmp\SubRepoFolder.hg\store\data_libraries_parallel_extensions_extras_coordination_data_structures_async_coordination_async_reader_writer.cs.i failed. The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
I have no idea what to do next, how to prevent VS from building files that it supposedly doesn't see. Any help would be greatly appreciated.
It turns out the fact that this is an Orchard solution is an important fact!
There's this line in Orchard.Web.csproj:
<Target Name="CustomCollectFiles">
<ItemGroup>
...
<_CustomFiles Include="Media\**\*;App_Data\**\*;Modules\**\*;Themes\**\*;Core\**\*" Exclude="**\obj\**;#(Orchard-Web-Bins -> '**\%(Filename)%(Extension)');**\*.csproj.user;**\*.hg*" />
It's used to copy files from Orchard-specific folders to the build package. Notice that it's supposed to exlude Mercurial files and folders, but it isn't. I changed the line to this:
<_CustomFiles Include="Media\**\*;App_Data\**\*;Modules\**\*;Themes\**\*;Core\**\*" Exclude="**\obj\**;#(Orchard-Web-Bins -> '**\%(Filename)%(Extension)');**\*.csproj.user;**\.hg\**" />
Note the "*" after .hg. Yes, this took me approximately three hours, walking through every build config option I could find to arrive at this.
Now this only excludes .hg folders, but not .hg files (like .hgignore or .htags) but I don't care: those are harmless in contrary to the .hg folders that include a bunch of files.
This blogpost helped me.

STRINGS_FILE_OUTPUT_ENCODING not working for me in Xcode 3.2.5

The STRINGS_FILE_OUTPUT_ENCODING build setting in Xcode 3.2.5 isn't working for me.
My source code, including the .strings files, are UTF-8. I want the built application to have the .strings files stored as UTF-16.
The Project | Edit Active Target "Build" tab (there's only one target) is set up as follows:
"Convert copied Files" (APPLY_RULES_IN_COPY_FILES) is checked.
"Strings file Output Encoding" (STRINGS_FILE_OUTPUT_ENCODING) is set to UTF-16.
But the .strings files in the .app that is built are still UTF-8.
Am I wrong about the purpose of STRINGS_FILE_OUTPUT_ENCODING? Or am I doing it wrong? Or what?
For anyone else with this problem:
This was caused by not properly registering the .strings files in Xcode as being for translations. The structure of the localization folders was wrong. When I corrected the structure and properly registered the .strings files for localization, everything worked.
(This was a project I inherited.)

Resources