Files
funstat-mcp-go/internal/telegram/normalize.go
你的用户名 8d1ce4598d Initial commit: FunStat MCP Server Go implementation
- Telegram integration for customer statistics
- MCP server implementation with rate limiting
- Cache system for performance optimization
- Multi-language support
- RESTful API endpoints

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 15:28:06 +08:00

46 lines
627 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package telegram
import "strings"
var buttonTextTranslations = map[rune]rune{
'ƒ': 'f',
'Μ': 'M',
'τ': 't',
'ѕ': 's',
'η': 'n',
'Ғ': 'F',
'α': 'a',
'ο': 'o',
'': 'u',
'о': 'o',
'е': 'e',
'с': 'c',
'': 'e',
'Τ': 'T',
'ρ': 'p',
'Δ': 'D',
'χ': 'x',
'β': 'b',
'λ': 'l',
'γ': 'y',
'Ν': 'N',
'μ': 'm',
'ψ': 'y',
'Α': 'A',
'Ρ': 'P',
'С': 'C',
'ё': 'e',
'ł': 'l',
'Ł': 'L',
'ց': 'g',
}
func normalizeButtonText(text string) string {
return strings.Map(func(r rune) rune {
if mapped, ok := buttonTextTranslations[r]; ok {
return mapped
}
return r
}, text)
}