fix(barcode): Use auto encoding for QR code generation to support all characters
This commit is contained in:
		@@ -69,7 +69,11 @@ func (b *DefaultBarcodeService) GenerateBarcode(format string, content string, w
 | 
			
		||||
		}
 | 
			
		||||
		break
 | 
			
		||||
	case "qr":
 | 
			
		||||
		generatedCode, err = qr.Encode(content, qr.M, qr.AlphaNumeric)
 | 
			
		||||
		// Always use qr.Auto encoding to support all characters in the content
 | 
			
		||||
		encoding := qr.Auto
 | 
			
		||||
 | 
			
		||||
		// QR code generation with error correction level M and auto encoding
 | 
			
		||||
		generatedCode, err = qr.Encode(content, qr.M, encoding)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return bytes.Buffer{}, err
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user