Метод C# как Base64String, но только алфавитно-цифровой (не плюс или наклонная черта)

Вы можете увидеть , как определить язык для строки в php , используя Text_LanguageDetect Pear Package или загрузив его, чтобы использовать его отдельно как обычную библиотеку php.

11
задан Alex 1 June 2009 в 03:54
поделиться

4 ответа

You're probably looking at using something like Base32 encoding then. There is a Base32 encoder/decoder for C# here by Michael Giagnocavo. It uses a combination of capitalized letters and numbers.

There's also a related discussion on StackOverflow here.

EDIT: And if by any chance this is for URL-safe related Base64 encoding, just do Base64 and replace "+" with "-" and "/" with "_". But I'm guessing, you may not want it for that.

12
ответ дан 3 December 2019 в 01:39
поделиться

A common variant of base-64 (for use on query-string) is to use '-' and '_' in place of '+' and '/'. Perhaps a bit of Replace(...) at each end would do the job?

2
ответ дан 3 December 2019 в 01:39
поделиться

вы можете заменить + или косую черту некоторой предопределенной строкой, если это возможно.

2
ответ дан 3 December 2019 в 01:39
поделиться

You can use BitConverter.ToString() which will give you a hex string. However the resulting strings will be longer than Base64 encoding.

0
ответ дан 3 December 2019 в 01:39
поделиться
Другие вопросы по тегам:

Похожие вопросы: