Resource (.resx) editor should accommodate entering special character sequences - by eradicator

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 782045 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 3/25/2013 9:31:21 AM
Access Restriction Public


The Visual Studio (2010, at least) resource editor currently provides no way to enter/edit special character sequences. For example, if one needs defines a string resource such as "Are you sure you want to delete the selected Customer(s)?", the WPF line-breaking algorithm breaks at the left parenthesis, so the string may show up word-wrapped as:

Are you sure you want to delete the selected Customer

depending on the width of the display control.

To get it to not break on the left paren, one needs to insert a "word joiner" special character into the string, so that the actual string in the .resx is:

Are you sure you want to delete the selected Customer&#8288;(s)?

One can manually edit the .resx file to set up the string value as above. However it would be better if the Resource Editor allowed to do this without having to resort to manually editing it (with e.g. Notepad). The Resource Editor instead assumes you literally want "&#8288;" in the string so it makes the string end up being:

Are you sure you want to delete the selected Customer&amp;#8288;(s)?
which of course does not display what we want.
Sign in to post a comment.
Posted by eradicator on 4/4/2013 at 8:55 AM
This makes the resource editor effectively unusable, if we have any resource strings that need special sequences in them. I am not pleased with this decision to not do anything about it.
Posted by Microsoft on 4/4/2013 at 8:46 AM
Thanks for reporting this issue and using Visual Studio. Unfortunately, this issue is something we have decided not to address. Since you have identified a workaround, I will be resolving this issue as Won’t Fix. In this case, you can also use a text file as a resource to workaround the issue.

Cathy Sullivan
Posted by Microsoft on 3/27/2013 at 12:40 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by eradicator on 3/26/2013 at 7:15 AM
The formatting of the original message and comments are all messed up - it processed my special character sequences here instead of showing the literal sequences I typed, and it lost newlines.

Hopefully the screenshots make it more clear what I am talking about!
Posted by eradicator on 3/26/2013 at 7:11 AM
SIGH - the special sequences I typed into the comment were parsed as special sequences so they don't show up!
The special sequence was & # 8288; (without spaces) - let's see if this shows up!
Posted by eradicator on 3/26/2013 at 7:07 AM
Added 6 screenshots as requested.
1) ResourceEditorString.png - shows adding a resource string using the resource editor and trying to put the special ⁠ sequence into it.
2) IncorrectValue.png - shows what the resource editor actually stored in the .resx file incorrectly. Should have stored ⁠ but stored instead ⁠ (which makes the part of the string literally be displayed as "⁠" instead of being treated as the special word-joiner character that was intended, when displayed in a WPF application on a messagebox or textbox, etc).
3) ManuallyCorrectedValue.png - shows manually editing the .resx file in Notepad to put the desired word-joiner sequence in the string correctly. When edited like this, the string correctly displays in a messagebox/textbox/etc making the "(s)" joined with the "Customer" string so it doesn't split them on multiple lines when it needs to split.
4) CantSeeSpecialSequence.png - shows how the manually edited string shows up in the resource shows up in resource editor. It shows no evidence of the special sequence being in there.
5) EditedAgain.png - shows adding more text to the string resource using the resource editor.
6) EditorDroppedSpecialSequence.png - shows the resulting .resx file after adding more text. It threw away the special sequence I had put in there, making me have to manually tweak it with Notepad again!
Posted by Microsoft on 3/26/2013 at 12:47 AM
Can you create a screen shot and attach it to the bug? The easiest way to do this is to hit the PrtScn button on the keyboard, paste it into Microsoft Paint and save it as a .PNG file.
Posted by Microsoft on 3/25/2013 at 9:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(