fix build with old text
Don't need decodeUtf8Lenient here because B64.encode surely always generates utf8. So decodeUtf8 is safe, it will never throw an exception.
This commit is contained in:
		
					parent
					
						
							
								dc11c5f493
							
						
					
				
			
			
				commit
				
					
						1467fed572
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -73,7 +73,7 @@ encodeB64Text b = case TE.decodeUtf8' b of
 | 
				
			||||||
		| otherwise -> t
 | 
							| otherwise -> t
 | 
				
			||||||
	Left _ -> b64wrapped
 | 
						Left _ -> b64wrapped
 | 
				
			||||||
  where
 | 
					  where
 | 
				
			||||||
	b64wrapped = TE.decodeUtf8Lenient $ "[" <> B64.encode b <> "]"
 | 
						b64wrapped = TE.decodeUtf8 $ "[" <> B64.encode b <> "]"
 | 
				
			||||||
	openbracket = fromIntegral (ord '[')
 | 
						openbracket = fromIntegral (ord '[')
 | 
				
			||||||
	closebracket = fromIntegral (ord ']')
 | 
						closebracket = fromIntegral (ord ']')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue