tmpacifitech
tmpacifitech

Reputation: 609

Why a dash appears inside the string?

I was working on an api function with C#. If a request is sent from the frontend, the api function receives a dash-included string.

enter image description here

Here you can see -JJLO. But when I double click it on the visual studio, it shows only JJLO (which is the correct one).

enter image description here

What kind of issue is this? The original one and real one is different.

FYI, Here's the GET method url.

http://localhost:54953/api/view?view=Transactions&columns=ID,Access_Write,Access_Delete,AccountSubType,AccountId,AccruedInterest,Commission,ContributionYear,ExchangeFee,ExDate,ImportFileName,ImportTrackingID,IsArchived,IsReversed,Note,ManagedType,Managers,MiscellaneousFee,ModelID,ModelFileAs,OriginalBasis,OriginalBasisDate,PayDate,SecurityId,SecuritySubType,SecurityType,Security_LastPriceDate,Security_Symbol,Security_WebPage,MutualFundFamilyWebPage,Security_LocalCurrency,SettleDate,SpinoffCost,Status,SubType,Status,TCode,AccountInvoiceID,EntityInvoiceID,CalcUnitBalance,Account_FileAs,Account_ID,Account_SubType,Security_FileAs,Security_ID,Security_SubType,TradeDate,ActivityType,SubType,Units,Price,Security_LocalCurrency,Amount,Security_LocalCurrency,Commission,Security_LocalCurrency,CalcUnitBalance&sort=&filter=IsOffset=FALSE AND (TCode="%SPOR%" OR TCode=­"JJLO%" OR TCode="­JJLI%" OR TCode="­JSO%" OR TCode="­JSI%" OR TCode="%SPLIT%" OR TCode="%SPLITSHORT%" OR TCode="%SPOD%" OR TCode="%SPOR%")&rowEnd=20&filters=%7B%7D&cache_breaker=1569863027037

Upvotes: -1

Views: 211

Answers (1)

JLRishe
JLRishe

Reputation: 101738

Thanks to you pasting the GET URL in your question now, we can now observe what's actually in that string:

enter image description here

Oddly, we can see that there's a fishy character before the quote symbol and it's character code 173 - "soft hyphen". That would sort of explain why we can see it sometimes but not other times.

It's a bit puzzling that it shows after the quote symbol in your debugger, but from the comments, it sounds like this is an issue with the value in the database, which you can clean up.

Upvotes: 2

Related Questions