primeng icon indicating copy to clipboard operation
primeng copied to clipboard

[p-table][filter] Filter ignores german specialchars ü === u

Open maximaexchen opened this issue 7 years ago • 3 comments

I'm submitting a ... (check one with "x")

[ x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior Specialchars ignored

Expected behavior Filter shoud repect specialchars like ä, ö, ü, ß

Minimal reproduction of the problem with instructions

https://github-rphzp8.stackblitz.io

Filter for "ö" or "ü" -> should not be found

What is the motivation / use case for changing the behavior?

Please tell us about your environment: Windows

  • Angular version: 8.1.1

  • PrimeNG version: 8.0.2

  • Browser: [all ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

maximaexchen avatar Nov 13 '19 10:11 maximaexchen

I guess this is intended. There is a function which removed these accents are transforms e.g. 'ö' to 'o' etc.

https://github.com/primefaces/primeng/blob/master/src/app/components/utils/objectutils.ts#L150

capc0 avatar Mar 09 '20 09:03 capc0

Hello @maximaexchen ,

I also encountered this problem today and as a workaround I did:

import { ObjectUtils } from 'primeng/utils'

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent extends ObjectUtils {

  constructor() {
      super();
      ObjectUtils.removeAccents = (str) => {    
      return str;
      }
}

At the moment, I have not found problems related to this workaround, so I hope it helps. :)

wizluo avatar Mar 17 '20 15:03 wizluo

Accents are removed by design, if there is more interest in the future, we may bring it back with an option like filterAccents="true".

cagataycivici avatar Mar 31 '20 14:03 cagataycivici