Windows 98 had some tricks using ALT+some integer to add invisible characters. These are normally called Control Characters.
The control characters U+0000–U+001F and U+007F come from ASCII. Additionally, U+0080–U+009F were used in conjunction with ISO 8859 character sets (among others). They are specified in ISO 6429 and often referred to as C0 and C1 control codes respectively. Most of these characters play no explicit role in Unicode text handling. The characters U+0000 , U+0009 (HT), U+000A (LF), U+000D (CR), and U+0085 (CR+LF) are commonly used in text processing as formatting characters.
This is how we can identify and remove them in a string;
string input; // this is your input string
string output = new string(input.Where(c => !char.IsControl(c)).ToArray());
Excel can be used.
Click on the Cell where you want to add character. Click Insert -> Symbols;
Select “Basic Latin” in Subset and add empty space;
This will add a special character in selected cell before or after the value depending on the position.
Notepad++ is another alternative and can be used to add special characters in a string.
Go to Edit > Character Panel to show the ASCII Insertion Panel.
Put the cursor where you want to insert the character.
Double-click the character (in the Character column) to insert.
For more info on NotePad++ special character handling, click here.
If there are two endpoint with same route, .NET Core Web API will throw request matched multiple endpoints error. Here is an example;
public IActionResult GetAllMenuItemsByMenuId(int menuId)
public IActionResult GetMenuItemsByMenuAndUser(int menuId, int userId)
This is impossible because the actions are dynamically activated. The request data (such as a query string) cannot be bound until the framework knows the action signature. It can’t know the action signature until it follows the route. Therefore, we can’t make routing dependent on things the framework doesn’t even know yet.
Long and short, we need to differentiate the routes in some way: either some other static path or making the userId a route param. However, we don’t actually need separate actions here. All action params are optional by default. Therefore, we can just have:
public IActionResult GetMenuItemsByMenu(int menuId, int userId)
And then we can branch on whether userId == 0 (the default). That should be fine here, because there will never be a user with an id of 0, but we may also consider making the param nullable and then branching on userId.HasValue instead, which is a bit more explicit.
We can also continue to keep the logic separate, if we prefer, by utilizing private methods. For example: